Update reader settings/rewording form upstream

This commit is contained in:
arkon 2020-05-21 13:47:01 -04:00 committed by Jay
parent 172702e177
commit 62e2a895f5
3 changed files with 120 additions and 85 deletions

View File

@ -10,61 +10,54 @@ class SettingsReaderController : SettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.reader titleRes = R.string.reader
preferenceCategory {
titleRes = R.string.general
intListPreference(activity) { intListPreference(activity) {
key = Keys.defaultViewer key = Keys.defaultViewer
titleRes = R.string.default_viewer titleRes = R.string.default_viewer
entriesRes = arrayOf(R.string.left_to_right_viewer, R.string.right_to_left_viewer, entriesRes = arrayOf(
R.string.vertical_viewer, R.string.webtoon, R.string.continuous_vertical) R.string.left_to_right_viewer,
R.string.right_to_left_viewer,
R.string.vertical_viewer,
R.string.webtoon,
R.string.continuous_vertical
)
entryRange = 1..5 entryRange = 1..5
defaultValue = 1 defaultValue = 1
} }
intListPreference(activity) {
key = Keys.imageScaleType
titleRes = R.string.scale_type
entriesRes = arrayOf(R.string.fit_screen, R.string.stretch,
R.string.fit_width, R.string.fit_height,
R.string.original_size, R.string.smart_fit)
entryRange = 1..6
defaultValue = 1
}
intListPreference(activity) {
key = Keys.zoomStart
titleRes = R.string.zoom_start_position
entriesRes = arrayOf(R.string.automatic, R.string.left,
R.string.right, R.string.center)
entryRange = 1..4
defaultValue = 1
}
intListPreference(activity) { intListPreference(activity) {
key = Keys.rotation key = Keys.rotation
titleRes = R.string.rotation titleRes = R.string.rotation
entriesRes = arrayOf(R.string.free, R.string.lock, entriesRes = arrayOf(
R.string.force_portrait, R.string.force_landscape) R.string.free, R.string.lock, R.string.force_portrait, R.string.force_landscape
)
entryRange = 1..4 entryRange = 1..4
defaultValue = 1 defaultValue = 1
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.readerTheme key = Keys.readerTheme
titleRes = R.string.background_color titleRes = R.string.background_color
entriesRes = arrayOf(R.string.white, R.string.black, R.string entriesRes = arrayOf(
.smart_based_on_page, R.string.smart_based_on_page_and_theme) R.string.white,
R.string.black,
R.string.smart_based_on_page,
R.string.smart_based_on_page_and_theme
)
entryRange = 0..3 entryRange = 0..3
defaultValue = 2 defaultValue = 2
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.doubleTapAnimationSpeed key = Keys.doubleTapAnimationSpeed
titleRes = R.string.double_tap_anim_speed titleRes = R.string.double_tap_anim_speed
entries = listOf(context.getString(R.string.no_animation), context.getString(R entries = listOf(
.string.fast), context.getString(R.string.normal)) 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 entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so
// min is 1 // min is 1
defaultValue = 500 defaultValue = 500
} }
switchPreference {
key = Keys.skipRead
titleRes = R.string.skip_read_chapters
defaultValue = false
}
switchPreference { switchPreference {
key = Keys.fullscreen key = Keys.fullscreen
titleRes = R.string.fullscreen titleRes = R.string.fullscreen
@ -84,18 +77,54 @@ class SettingsReaderController : SettingsController() {
switchPreference { switchPreference {
key = Keys.trueColor key = Keys.trueColor
titleRes = R.string.true_32bit_color titleRes = R.string.true_32bit_color
summaryRes = R.string.reduces_banding_impacts_performance
defaultValue = false defaultValue = false
} }
} }
}
preferenceCategory {
titleRes = R.string.reading
switchPreference {
key = Keys.skipRead
titleRes = R.string.skip_read_chapters
defaultValue = false
}
switchPreference { switchPreference {
key = Keys.alwaysShowChapterTransition key = Keys.alwaysShowChapterTransition
titleRes = R.string.always_show_chapter_transition titleRes = R.string.always_show_chapter_transition
summaryRes = R.string.if_disabled_transition_will_skip
defaultValue = true defaultValue = true
} }
}
preferenceCategory { preferenceCategory {
titleRes = R.string.pager_viewer titleRes = R.string.paged
intListPreference(activity) {
key = Keys.imageScaleType
titleRes = R.string.scale_type
entriesRes = arrayOf(
R.string.fit_screen,
R.string.stretch,
R.string.fit_width,
R.string.fit_height,
R.string.original_size,
R.string.smart_fit
)
entryRange = 1..6
defaultValue = 1
}
intListPreference(activity) {
key = Keys.zoomStart
titleRes = R.string.zoom_start_position
entriesRes = arrayOf(
R.string.automatic, R.string.left, R.string.right, R.string.center
)
entryRange = 1..4
defaultValue = 1
}
switchPreference { switchPreference {
key = Keys.enableTransitions key = Keys.enableTransitions
titleRes = R.string.page_transitions titleRes = R.string.page_transitions
@ -121,8 +150,10 @@ class SettingsReaderController : SettingsController() {
titleRes = R.string.pref_webtoon_side_padding titleRes = R.string.pref_webtoon_side_padding
entriesRes = arrayOf( entriesRes = arrayOf(
R.string.webtoon_side_padding_0, R.string.webtoon_side_padding_0,
R.string.webtoon_side_padding_10, R.string.webtoon_side_padding_15, R.string.webtoon_side_padding_10,
R.string.webtoon_side_padding_20, R.string.webtoon_side_padding_25 R.string.webtoon_side_padding_15,
R.string.webtoon_side_padding_20,
R.string.webtoon_side_padding_25
) )
entryValues = listOf(0, 10, 15, 20, 25) entryValues = listOf(0, 10, 15, 20, 25)
defaultValue = "0" defaultValue = "0"

View File

@ -158,7 +158,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="@string/pager_viewer" android:text="@string/paged"
android:textColor="?attr/colorAccent" android:textColor="?attr/colorAccent"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -291,6 +291,8 @@
<string name="double_tap_anim_speed">Double tap animation speed</string> <string name="double_tap_anim_speed">Double tap animation speed</string>
<string name="show_page_number">Show page number</string> <string name="show_page_number">Show page number</string>
<string name="true_32bit_color">32-bit color</string> <string name="true_32bit_color">32-bit color</string>
<string name="reduces_banding_impacts_performance">Reduces banding, but impacts
performance</string>
<string name="crop_borders">Crop borders</string> <string name="crop_borders">Crop borders</string>
<string name="use_custom_brightness">Use custom brightness</string> <string name="use_custom_brightness">Use custom brightness</string>
<string name="use_custom_color_filter">Use custom color filter</string> <string name="use_custom_color_filter">Use custom color filter</string>
@ -317,7 +319,7 @@
<string name="right_to_left_viewer">Right to left</string> <string name="right_to_left_viewer">Right to left</string>
<string name="vertical_viewer">Vertical</string> <string name="vertical_viewer">Vertical</string>
<string name="continuous_vertical">Continuous vertical</string> <string name="continuous_vertical">Continuous vertical</string>
<string name="pager_viewer">Pager</string> <string name="paged">Paged</string>
<string name="scale_type">Scale type</string> <string name="scale_type">Scale type</string>
<string name="fit_screen">Fit screen</string> <string name="fit_screen">Fit screen</string>
<string name="stretch">Stretch</string> <string name="stretch">Stretch</string>
@ -335,6 +337,8 @@
<string name="smart_based_on_page">Smart (based on page)</string> <string name="smart_based_on_page">Smart (based on page)</string>
<string name="smart_based_on_page_and_theme">Smart (based on page and theme)</string> <string name="smart_based_on_page_and_theme">Smart (based on page and theme)</string>
<string name="always_show_chapter_transition">Always show chapter transition</string> <string name="always_show_chapter_transition">Always show chapter transition</string>
<string name="if_disabled_transition_will_skip">If disabled, the transition page will be
skipped if the next chapter is loaded</string>
<string name="pref_webtoon_side_padding">Side padding</string> <string name="pref_webtoon_side_padding">Side padding</string>
<string name="webtoon_side_padding_0">None</string> <string name="webtoon_side_padding_0">None</string>
<string name="webtoon_side_padding_10">10%</string> <string name="webtoon_side_padding_10">10%</string>