mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 00:59:24 +01:00
Add gray reader background option (closes #3019)
This commit is contained in:
parent
abf2d4b718
commit
1ab07d169d
@ -128,7 +128,8 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
setTheme(
|
setTheme(
|
||||||
when (preferences.readerTheme().get()) {
|
when (preferences.readerTheme().get()) {
|
||||||
0 -> R.style.Theme_Reader_Light
|
0 -> R.style.Theme_Reader_Light
|
||||||
else -> R.style.Theme_Reader
|
2 -> R.style.Theme_Reader_Dark_Grey
|
||||||
|
else -> R.style.Theme_Reader_Dark
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -81,7 +81,7 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
|
|||||||
viewer.setSelection(activity.presenter.manga?.viewer ?: 0, false)
|
viewer.setSelection(activity.presenter.manga?.viewer ?: 0, false)
|
||||||
|
|
||||||
rotation_mode.bindToPreference(preferences.rotation(), 1)
|
rotation_mode.bindToPreference(preferences.rotation(), 1)
|
||||||
background_color.bindToPreference(preferences.readerTheme())
|
background_color.bindToIntPreference(preferences.readerTheme(), R.array.reader_themes_values)
|
||||||
show_page_number.bindToPreference(preferences.showPageNumber())
|
show_page_number.bindToPreference(preferences.showPageNumber())
|
||||||
fullscreen.bindToPreference(preferences.fullscreen())
|
fullscreen.bindToPreference(preferences.fullscreen())
|
||||||
cutout_short.bindToPreference(preferences.cutoutShort())
|
cutout_short.bindToPreference(preferences.cutoutShort())
|
||||||
|
@ -68,8 +68,8 @@ class SettingsReaderController : SettingsController() {
|
|||||||
intListPreference {
|
intListPreference {
|
||||||
key = Keys.readerTheme
|
key = Keys.readerTheme
|
||||||
titleRes = R.string.pref_reader_theme
|
titleRes = R.string.pref_reader_theme
|
||||||
entriesRes = arrayOf(R.string.white_background, R.string.black_background)
|
entriesRes = arrayOf(R.string.black_background, R.string.gray_background, R.string.white_background)
|
||||||
entryValues = arrayOf("0", "1")
|
entryValues = arrayOf("1", "2", "0")
|
||||||
defaultValue = "1"
|
defaultValue = "1"
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,15 @@
|
|||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="reader_themes">
|
<string-array name="reader_themes">
|
||||||
<item>@string/white_background</item>
|
|
||||||
<item>@string/black_background</item>
|
<item>@string/black_background</item>
|
||||||
|
<item>@string/gray_background</item>
|
||||||
|
<item>@string/white_background</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="reader_themes_values">
|
<string-array name="reader_themes_values">
|
||||||
<item>0</item>
|
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>0</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="image_decoders">
|
<string-array name="image_decoders">
|
||||||
|
@ -240,6 +240,7 @@
|
|||||||
<string name="pref_read_with_long_tap">Long tap dialog</string>
|
<string name="pref_read_with_long_tap">Long tap dialog</string>
|
||||||
<string name="pref_reader_theme">Background color</string>
|
<string name="pref_reader_theme">Background color</string>
|
||||||
<string name="white_background">White</string>
|
<string name="white_background">White</string>
|
||||||
|
<string name="gray_background">Gray</string>
|
||||||
<string name="black_background">Black</string>
|
<string name="black_background">Black</string>
|
||||||
<string name="pref_viewer_type">Default viewer</string>
|
<string name="pref_viewer_type">Default viewer</string>
|
||||||
<string name="default_viewer">Default</string>
|
<string name="default_viewer">Default</string>
|
||||||
|
@ -217,13 +217,13 @@
|
|||||||
<item name="switchStyle">@style/Theme.Widget.BasicSwitch</item>
|
<item name="switchStyle">@style/Theme.Widget.BasicSwitch</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Reader" parent="Theme.Base.Reader.Dark">
|
<style name="Theme.Reader.Dark" parent="Theme.Base.Reader.Dark" />
|
||||||
<!-- Attributes specific for SDK 16 to SDK 20 -->
|
|
||||||
|
<style name="Theme.Reader.Dark.Grey" parent="Theme.Base.Reader.Dark">
|
||||||
|
<item name="android:colorBackground">@color/backgroundDark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Reader.Light" parent="Theme.Base.Reader.Light">
|
<style name="Theme.Reader.Light" parent="Theme.Base.Reader.Light" />
|
||||||
<!-- Attributes specific for SDK 16 to SDK 20 -->
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<!--===============-->
|
<!--===============-->
|
||||||
|
Loading…
Reference in New Issue
Block a user