mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-28 20:17:51 +02:00
Split general reader settings into reading mode and display
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user