Reword some reader settings

This commit is contained in:
arkon 2022-10-05 09:26:42 -04:00
parent 3b62396442
commit caf9219d99
6 changed files with 32 additions and 22 deletions

View file

@ -132,7 +132,6 @@ android {
}
lint {
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
abortOnError = false
checkReleaseBuilds = false
}

View file

@ -69,10 +69,15 @@ class ReaderReadingModeSettings @JvmOverloads constructor(context: Context, attr
binding.pagerPrefsGroup.root.isVisible = true
binding.pagerPrefsGroup.tappingInverted.bindToPreference(readerPreferences.pagerNavInverted())
binding.pagerPrefsGroup.navigatePan.bindToPreference(readerPreferences.navigateToPan())
binding.pagerPrefsGroup.pagerNav.bindToPreference(readerPreferences.navigationModePager())
readerPreferences.navigationModePager()
.asHotFlow { binding.pagerPrefsGroup.tappingInverted.isVisible = it != 5 }
.asHotFlow {
val isTappingEnabled = it != 5
binding.pagerPrefsGroup.tappingInverted.isVisible = isTappingEnabled
binding.pagerPrefsGroup.navigatePan.isVisible = isTappingEnabled
}
.launchIn((context as ReaderActivity).lifecycleScope)
// Makes so that landscape zoom gets hidden away when image scale type is not fit screen
binding.pagerPrefsGroup.scaleType.bindToPreference(readerPreferences.imageScaleType(), 1)
@ -83,7 +88,6 @@ class ReaderReadingModeSettings @JvmOverloads constructor(context: Context, attr
binding.pagerPrefsGroup.zoomStart.bindToPreference(readerPreferences.zoomStart(), 1)
binding.pagerPrefsGroup.cropBorders.bindToPreference(readerPreferences.cropBorders())
binding.pagerPrefsGroup.navigatePan.bindToPreference(readerPreferences.navigateToPan())
binding.pagerPrefsGroup.dualPageSplit.bindToPreference(readerPreferences.dualPageSplitPaged())
// Makes it so that dual page invert gets hidden away when dual page split is turned off

View file

@ -164,6 +164,11 @@ class SettingsReaderController : SettingsController() {
summary = "%s"
visibleIf(readerPreferences.navigationModePager()) { it != 5 }
}
switchPreference {
bindTo(readerPreferences.navigateToPan())
titleRes = R.string.pref_navigate_pan
visibleIf(readerPreferences.navigationModePager()) { it != 5 }
}
intListPreference {
bindTo(readerPreferences.imageScaleType())
titleRes = R.string.pref_image_scale_type
@ -199,10 +204,6 @@ class SettingsReaderController : SettingsController() {
bindTo(readerPreferences.cropBorders())
titleRes = R.string.pref_crop_borders
}
switchPreference {
bindTo(readerPreferences.navigateToPan())
titleRes = R.string.pref_navigate_pan
}
switchPreference {
bindTo(readerPreferences.dualPageSplitPaged())
titleRes = R.string.pref_dual_page_split

View file

@ -30,6 +30,15 @@
android:entries="@array/invert_tapping_mode"
app:title="@string/pref_read_with_tapping_inverted" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/navigate_pan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="16dp"
android:paddingVertical="16dp"
android:text="@string/pref_navigate_pan"
android:textColor="?android:attr/textColorSecondary" />
<eu.kanade.tachiyomi.widget.MaterialSpinnerView
android:id="@+id/scale_type"
android:layout_width="match_parent"
@ -62,15 +71,6 @@
android:text="@string/pref_crop_borders"
android:textColor="?android:attr/textColorSecondary" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/navigate_pan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="16dp"
android:paddingVertical="16dp"
android:text="@string/pref_navigate_pan"
android:textColor="?android:attr/textColorSecondary" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/dual_page_split"
android:layout_width="match_parent"

View file

@ -19,6 +19,10 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
lint {
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
}
}
tasks {

View file

@ -2,6 +2,10 @@
<resources>
<string name="app_name" translatable="false">Tachiyomi</string>
<!-- Generic strings -->
<string name="on">On</string>
<string name="off">Off</string>
<!-- Models -->
<string name="name">Name</string>
<string name="categories">Categories</string>
@ -295,9 +299,9 @@
<string name="pref_fullscreen">Fullscreen</string>
<string name="pref_show_navigation_mode">Show tap zones overlay</string>
<string name="pref_show_navigation_mode_summary">Briefly show when reader is opened</string>
<string name="pref_dual_page_split">Dual page split</string>
<string name="pref_dual_page_invert">Invert dual page split placement</string>
<string name="pref_dual_page_invert_summary">If the placement of the dual page split doesn\'t match reading direction</string>
<string name="pref_dual_page_split">Split wide pages</string>
<string name="pref_dual_page_invert">Invert split page placement</string>
<string name="pref_dual_page_invert_summary">If the placement of the split wide pages don\'t match reading direction</string>
<string name="pref_long_strip_split">Split tall images (BETA)</string>
<string name="pref_cutout_short">Show content in cutout area</string>
<string name="pref_page_transitions">Animate page transitions</string>
@ -308,8 +312,6 @@
<string name="pref_true_color">32-bit color</string>
<string name="pref_true_color_summary">Reduces banding, but may impact performance</string>
<string name="pref_crop_borders">Crop borders</string>
<string name="on">On</string>
<string name="off">Off</string>
<string name="pref_custom_brightness">Custom brightness</string>
<string name="pref_grayscale">Grayscale</string>
<string name="pref_inverted_colors">Inverted</string>
@ -364,7 +366,7 @@
<string name="scale_type_fit_height">Fit height</string>
<string name="scale_type_original_size">Original size</string>
<string name="scale_type_smart_fit">Smart fit</string>
<string name="pref_navigate_pan">Navigate to pan</string>
<string name="pref_navigate_pan">Pan wide images when tapping</string>
<string name="pref_landscape_zoom">Zoom landscape image</string>
<string name="pref_zoom_start">Zoom start position</string>
<string name="zoom_start_automatic">Automatic</string>