Reordering reader settings

So it's more in line with upstream
This commit is contained in:
Jays2Kings 2021-03-24 17:41:56 -04:00
parent 42e2e60645
commit 380b609847
2 changed files with 34 additions and 29 deletions

View File

@ -16,7 +16,7 @@ class SettingsReaderController : SettingsController() {
titleRes = R.string.general
intListPreference(activity) {
key = Keys.defaultViewer
titleRes = R.string.default_viewer
titleRes = R.string.default_reading_mode
entriesRes = arrayOf(
R.string.left_to_right_viewer,
R.string.right_to_left_viewer,
@ -27,6 +27,38 @@ class SettingsReaderController : SettingsController() {
entryRange = 1..5
defaultValue = 1
}
intListPreference(activity) {
key = Keys.doubleTapAnimationSpeed
titleRes = R.string.double_tap_anim_speed
entries = listOf(
context.getString(R.string.no_animation),
context.getString(
R.string.fast
),
context.getString(R.string.normal)
)
entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so
// min is 1
defaultValue = 500
}
switchPreference {
key = Keys.enableTransitions
titleRes = R.string.page_transitions
defaultValue = true
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
switchPreference {
key = Keys.trueColor
titleRes = R.string.true_32bit_color
summaryRes = R.string.reduces_banding_impacts_performance
defaultValue = false
}
}
}
preferenceCategory {
titleRes = R.string.display
intListPreference(activity) {
key = Keys.rotation
titleRes = R.string.rotation
@ -51,20 +83,6 @@ class SettingsReaderController : SettingsController() {
entryRange = 0..3
defaultValue = 2
}
intListPreference(activity) {
key = Keys.doubleTapAnimationSpeed
titleRes = R.string.double_tap_anim_speed
entries = listOf(
context.getString(R.string.no_animation),
context.getString(
R.string.fast
),
context.getString(R.string.normal)
)
entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so
// min is 1
defaultValue = 500
}
switchPreference {
key = Keys.fullscreen
titleRes = R.string.fullscreen
@ -80,14 +98,6 @@ class SettingsReaderController : SettingsController() {
titleRes = R.string.show_page_number
defaultValue = true
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
switchPreference {
key = Keys.trueColor
titleRes = R.string.true_32bit_color
summaryRes = R.string.reduces_banding_impacts_performance
defaultValue = false
}
}
}
preferenceCategory {
@ -140,11 +150,6 @@ class SettingsReaderController : SettingsController() {
entryRange = 1..4
defaultValue = 1
}
switchPreference {
key = Keys.enableTransitions
titleRes = R.string.page_transitions
defaultValue = true
}
switchPreference {
key = Keys.cropBorders
titleRes = R.string.crop_borders

View File

@ -332,7 +332,7 @@
<string name="black">Black</string>
<string name="smart_by_page">Smart (by page)</string>
<string name="smart_by_theme">Smart (by theme)</string>
<string name="default_viewer">Default viewer</string>
<string name="default_reading_mode">Default reading mode</string>
<string name="left_to_right_viewer">Left to right</string>
<string name="right_to_left_viewer">Right to left</string>
<string name="vertical_viewer">Vertical</string>