mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 04:37:25 +01:00
Split general reader settings into reading mode and display
This commit is contained in:
parent
b363b9fc1a
commit
d353a3457d
@ -23,7 +23,7 @@ class SettingsReaderController : SettingsController() {
|
||||
titleRes = R.string.pref_category_reader
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_general
|
||||
titleRes = R.string.pref_category_reading_mode
|
||||
|
||||
intListPreference {
|
||||
key = Keys.defaultViewer
|
||||
@ -36,6 +36,43 @@ class SettingsReaderController : SettingsController() {
|
||||
defaultValue = "2"
|
||||
summary = "%s"
|
||||
}
|
||||
intListPreference {
|
||||
key = Keys.doubleTapAnimationSpeed
|
||||
titleRes = R.string.pref_double_tap_anim_speed
|
||||
entries = arrayOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R.string.double_tap_anim_speed_fast), context.getString(R.string.double_tap_anim_speed_normal))
|
||||
entryValues = arrayOf("1", "250", "500") // using a value of 0 breaks the image viewer, so min is 1
|
||||
defaultValue = "500"
|
||||
summary = "%s"
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showReadingMode
|
||||
titleRes = R.string.pref_show_reading_mode
|
||||
summaryRes = R.string.pref_show_reading_mode_summary
|
||||
defaultValue = true
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
switchPreference {
|
||||
key = Keys.trueColor
|
||||
titleRes = R.string.pref_true_color
|
||||
summaryRes = R.string.pref_true_color_summary
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.cropBorders
|
||||
titleRes = R.string.pref_crop_borders
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.enableTransitions
|
||||
titleRes = R.string.pref_page_transitions
|
||||
defaultValue = true
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_display
|
||||
|
||||
intListPreference {
|
||||
key = Keys.rotation
|
||||
titleRes = R.string.pref_rotation_type
|
||||
@ -55,14 +92,6 @@ class SettingsReaderController : SettingsController() {
|
||||
defaultValue = "1"
|
||||
summary = "%s"
|
||||
}
|
||||
intListPreference {
|
||||
key = Keys.doubleTapAnimationSpeed
|
||||
titleRes = R.string.pref_double_tap_anim_speed
|
||||
entries = arrayOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R.string.double_tap_anim_speed_fast), context.getString(R.string.double_tap_anim_speed_normal))
|
||||
entryValues = arrayOf("1", "250", "500") // using a value of 0 breaks the image viewer, so min is 1
|
||||
defaultValue = "500"
|
||||
summary = "%s"
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.fullscreen
|
||||
titleRes = R.string.pref_fullscreen
|
||||
@ -87,30 +116,6 @@ class SettingsReaderController : SettingsController() {
|
||||
titleRes = R.string.pref_show_page_number
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showReadingMode
|
||||
titleRes = R.string.pref_show_reading_mode
|
||||
summaryRes = R.string.pref_show_reading_mode_summary
|
||||
defaultValue = true
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
switchPreference {
|
||||
key = Keys.trueColor
|
||||
titleRes = R.string.pref_true_color
|
||||
summaryRes = R.string.pref_true_color_summary
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.cropBorders
|
||||
titleRes = R.string.pref_crop_borders
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.enableTransitions
|
||||
titleRes = R.string.pref_page_transitions
|
||||
defaultValue = true
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
|
@ -297,6 +297,7 @@
|
||||
<string name="color_filter_b_value">B</string>
|
||||
<string name="color_filter_a_value">A</string>
|
||||
<string name="pref_always_show_chapter_transition">Always show chapter transition</string>
|
||||
<string name="pref_category_reading_mode">Reading mode</string>
|
||||
<string name="pref_category_reading">Reading</string>
|
||||
<string name="pref_webtoon_side_padding">Side padding</string>
|
||||
<string name="webtoon_side_padding_0">None</string>
|
||||
|
Loading…
Reference in New Issue
Block a user