mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:55:11 +01:00
Update reader settings/rewording form upstream
This commit is contained in:
parent
172702e177
commit
62e2a895f5
@ -10,92 +10,121 @@ class SettingsReaderController : SettingsController() {
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.reader
|
||||
|
||||
intListPreference(activity) {
|
||||
key = Keys.defaultViewer
|
||||
titleRes = R.string.default_viewer
|
||||
entriesRes = arrayOf(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
|
||||
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) {
|
||||
key = Keys.rotation
|
||||
titleRes = R.string.rotation
|
||||
entriesRes = arrayOf(R.string.free, R.string.lock,
|
||||
R.string.force_portrait, R.string.force_landscape)
|
||||
entryRange = 1..4
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.readerTheme
|
||||
titleRes = R.string.background_color
|
||||
entriesRes = arrayOf(R.string.white, R.string.black, R.string
|
||||
.smart_based_on_page, R.string.smart_based_on_page_and_theme)
|
||||
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.skipRead
|
||||
titleRes = R.string.skip_read_chapters
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.fullscreen
|
||||
titleRes = R.string.fullscreen
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.keepScreenOn
|
||||
titleRes = R.string.keep_screen_on
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showPageNumber
|
||||
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
|
||||
defaultValue = false
|
||||
preferenceCategory {
|
||||
titleRes = R.string.general
|
||||
intListPreference(activity) {
|
||||
key = Keys.defaultViewer
|
||||
titleRes = R.string.default_viewer
|
||||
entriesRes = arrayOf(
|
||||
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
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.rotation
|
||||
titleRes = R.string.rotation
|
||||
entriesRes = arrayOf(
|
||||
R.string.free, R.string.lock, R.string.force_portrait, R.string.force_landscape
|
||||
)
|
||||
entryRange = 1..4
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.readerTheme
|
||||
titleRes = R.string.background_color
|
||||
entriesRes = arrayOf(
|
||||
R.string.white,
|
||||
R.string.black,
|
||||
R.string.smart_based_on_page,
|
||||
R.string.smart_based_on_page_and_theme
|
||||
)
|
||||
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
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.keepScreenOn
|
||||
titleRes = R.string.keep_screen_on
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showPageNumber
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.alwaysShowChapterTransition
|
||||
titleRes = R.string.always_show_chapter_transition
|
||||
defaultValue = true
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pager_viewer
|
||||
titleRes = R.string.reading
|
||||
|
||||
switchPreference {
|
||||
key = Keys.skipRead
|
||||
titleRes = R.string.skip_read_chapters
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.alwaysShowChapterTransition
|
||||
titleRes = R.string.always_show_chapter_transition
|
||||
summaryRes = R.string.if_disabled_transition_will_skip
|
||||
defaultValue = true
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
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 {
|
||||
key = Keys.enableTransitions
|
||||
titleRes = R.string.page_transitions
|
||||
@ -121,8 +150,10 @@ class SettingsReaderController : SettingsController() {
|
||||
titleRes = R.string.pref_webtoon_side_padding
|
||||
entriesRes = arrayOf(
|
||||
R.string.webtoon_side_padding_0,
|
||||
R.string.webtoon_side_padding_10, R.string.webtoon_side_padding_15,
|
||||
R.string.webtoon_side_padding_20, R.string.webtoon_side_padding_25
|
||||
R.string.webtoon_side_padding_10,
|
||||
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)
|
||||
defaultValue = "0"
|
||||
|
@ -158,7 +158,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/pager_viewer"
|
||||
android:text="@string/paged"
|
||||
android:textColor="?attr/colorAccent"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -291,6 +291,8 @@
|
||||
<string name="double_tap_anim_speed">Double tap animation speed</string>
|
||||
<string name="show_page_number">Show page number</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="use_custom_brightness">Use custom brightness</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="vertical_viewer">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="fit_screen">Fit screen</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_and_theme">Smart (based on page and theme)</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="webtoon_side_padding_0">None</string>
|
||||
<string name="webtoon_side_padding_10">10%</string>
|
||||
|
Loading…
Reference in New Issue
Block a user