diff --git a/src/Screens/Chapter/components/ReaderSheet.js b/src/Screens/Chapter/components/ReaderSheet.js index 16e589ee..e4ef8d2a 100644 --- a/src/Screens/Chapter/components/ReaderSheet.js +++ b/src/Screens/Chapter/components/ReaderSheet.js @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { StyleSheet, View, Text, Dimensions } from "react-native"; -import { ToggleButton, IconButton, Menu } from "react-native-paper"; +import { ToggleButton, IconButton, Menu, Switch } from "react-native-paper"; import Slider from "@react-native-community/slider"; import Bottomsheet from "rn-sliding-up-panel"; import { fonts } from "../../../Services/utils/constants"; @@ -9,7 +9,14 @@ import { setReaderSettings } from "../../../redux/settings/settings.actions"; import BottomSheetHandle from "../../../Components/BottomSheetHandle"; import { Row } from "../../../Components/Common"; -const ReaderSheet = ({ theme, reader, dispatch, bottomSheetRef }) => { +const ReaderSheet = ({ + theme, + reader, + dispatch, + bottomSheetRef, + selectText, + setSelectText, +}) => { const [fontMenu, setFontMenu] = useState(false); const openFontMenu = () => setFontMenu(true); const closeFontMenu = () => setFontMenu(false); @@ -21,8 +28,8 @@ const ReaderSheet = ({ theme, reader, dispatch, bottomSheetRef }) => { return ( @@ -344,6 +351,31 @@ const ReaderSheet = ({ theme, reader, dispatch, bottomSheetRef }) => { ))} + + + + + (Justify does not work with selectable text) + + + + diff --git a/src/Screens/More/components/AccentColorModal.js b/src/Screens/More/components/AccentColorModal.js index 31b7c523..7b820daf 100644 --- a/src/Screens/More/components/AccentColorModal.js +++ b/src/Screens/More/components/AccentColorModal.js @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { StyleSheet, Text } from "react-native"; -import { Modal, TextInput } from "react-native-paper"; +import { Modal, Portal, TextInput } from "react-native-paper"; import { setAccentColor } from "../../../redux/settings/settings.actions"; const AccentColorModal = ({ @@ -13,50 +13,55 @@ const AccentColorModal = ({ const [error, setError] = useState(); return ( - { - hideAccentColorModal(); - setText(); - setError(); - }} - contentContainerStyle={[ - styles.containerStyle, - { backgroundColor: theme.colorPrimary }, - ]} - > - + { + hideAccentColorModal(); + setText(); + setError(); + }} + contentContainerStyle={[ + styles.containerStyle, + { backgroundColor: theme.colorPrimary }, + ]} > - Hex Color Code - - setText(text)} - onSubmitEditing={() => { - if (text.match(/^#[0-9a-f]{3,6}$/i)) { - dispatch(setAccentColor(text)); - hideAccentColorModal(); - } else { - setError("Enter a valid hex color code"); - } - }} - mode="outlined" - theme={{ - colors: { - primary: theme.colorAccent, - placeholder: theme.textColorHint, - text: theme.textColorPrimary, - background: "transparent", - }, - }} - underlineColor={theme.textColorHint} - dense - error={error} - /> - {error} - + + Hex Color Code + + setText(text)} + onSubmitEditing={() => { + if (text.match(/^#[0-9a-f]{3,6}$/i)) { + dispatch(setAccentColor(text)); + hideAccentColorModal(); + } else { + setError("Enter a valid hex color code"); + } + }} + mode="outlined" + theme={{ + colors: { + primary: theme.colorAccent, + placeholder: theme.textColorHint, + text: theme.textColorPrimary, + background: "transparent", + }, + }} + underlineColor={theme.textColorHint} + dense + error={error} + /> + {error} + + ); }; diff --git a/src/Theme/theme.js b/src/Theme/theme.js index 334646cb..1dbd5b3f 100644 --- a/src/Theme/theme.js +++ b/src/Theme/theme.js @@ -29,7 +29,7 @@ export const lightTheme = { dividerColor: "rgba(0,0,0,0.1)", filterColor: "#FFC107", colorDisabled: "rgba(220,220,220,255)", - colorButtonText: "#000000", + colorButtonText: "#FFFFFF", statusBar: "dark", }; @@ -67,7 +67,7 @@ export const amoledDarkTheme = { textColorPrimary: "#FFFFFF", textColorSecondary: "rgba(255,255,255,0.7)", textColorHint: "rgba(255,255,255,0.5)", - rippleColor: "rgba(255,255,255,0.06)", + rippleColor: "rgba(255,255,255,0.12)", searchBarColor: "#1F1F1F", menuColor: "#242529", filterColor: "#FFEB3B",