diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt
index 48b5be406..722380f0d 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt
@@ -47,6 +47,8 @@ object PreferenceKeys {
const val cropBordersWebtoon = "crop_borders_webtoon"
+ const val padPagesVertWebtoon = "pad_pages_vert_webtoon"
+
const val readWithTapping = "reader_tap"
const val readWithLongTap = "reader_long_tap"
diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
index 6dd69a2c8..eb700ba8b 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
@@ -104,6 +104,8 @@ class PreferencesHelper(val context: Context) {
fun cropBordersWebtoon() = rxPrefs.getBoolean(Keys.cropBordersWebtoon, false)
+ fun padPagesVertWebtoon() = rxPrefs.getBoolean(Keys.padPagesVertWebtoon, false)
+
fun readWithTapping() = rxPrefs.getBoolean(Keys.readWithTapping, true)
fun readWithLongTap() = rxPrefs.getBoolean(Keys.readWithLongTap, true)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt
index d66982af3..84760567f 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt
@@ -79,6 +79,7 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
scale_type.bindToPreference(preferences.imageScaleType(), 1)
zoom_start.bindToPreference(preferences.zoomStart(), 1)
crop_borders.bindToPreference(preferences.cropBorders())
+ pad_pages_vert_webtoon.bindToPreference(preferences.padPagesVertWebtoon())
page_transitions.bindToPreference(preferences.pageTransitions())
}
@@ -88,6 +89,7 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
private fun initWebtoonPreferences() {
webtoon_prefs_group.visible()
crop_borders_webtoon.bindToPreference(preferences.cropBordersWebtoon())
+ pad_pages_vert_webtoon.bindToPreference(preferences.padPagesVertWebtoon())
}
/**
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt
index 2b18561cf..0007edc79 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt
@@ -31,6 +31,9 @@ class WebtoonConfig(preferences: PreferencesHelper = Injekt.get()) {
var imageCropBorders = false
private set
+ var padPagesVert = false
+ private set
+
var doubleTapAnimDuration = 500
private set
@@ -44,6 +47,9 @@ class WebtoonConfig(preferences: PreferencesHelper = Injekt.get()) {
preferences.cropBordersWebtoon()
.register({ imageCropBorders = it }, { imagePropertyChangedListener?.invoke() })
+ preferences.padPagesVertWebtoon()
+ .register({ padPagesVert = it }, { imagePropertyChangedListener?.invoke() })
+
preferences.doubleTapAnimSpeed()
.register({ doubleTapAnimDuration = it })
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt
index 0897ee901..1414ccf46 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt
@@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.ui.reader.viewer.webtoon
import android.annotation.SuppressLint
import android.content.Intent
+import android.graphics.Color
import android.graphics.drawable.Drawable
import android.net.Uri
import android.view.Gravity
@@ -31,6 +32,7 @@ import eu.kanade.tachiyomi.ui.reader.model.ReaderPage
import eu.kanade.tachiyomi.ui.reader.viewer.ReaderProgressBar
import eu.kanade.tachiyomi.util.system.ImageUtil
import eu.kanade.tachiyomi.util.system.dpToPx
+import eu.kanade.tachiyomi.util.system.pxToDp
import eu.kanade.tachiyomi.util.view.gone
import eu.kanade.tachiyomi.util.view.visible
import rx.Observable
@@ -112,6 +114,9 @@ class WebtoonPageHolder(
init {
frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)
+ if (viewer.config.padPagesVert) {
+ frame.setPadding(0, 0, 0, 15.dpToPx)
+ }
}
/**
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt
index fc6c234c4..2cc38d672 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt
@@ -120,6 +120,11 @@ class SettingsReaderController : SettingsController() {
titleRes = R.string.pref_crop_borders
defaultValue = false
}
+ switchPreference {
+ key = Keys.padPagesVertWebtoon
+ titleRes = R.string.pref_webtoon_padding_vert
+ defaultValue = false
+ }
}
preferenceCategory {
titleRes = R.string.pref_reader_navigation
diff --git a/app/src/main/res/layout/reader_settings_sheet.xml b/app/src/main/res/layout/reader_settings_sheet.xml
index cf6e8fb9c..26fe95b31 100644
--- a/app/src/main/res/layout/reader_settings_sheet.xml
+++ b/app/src/main/res/layout/reader_settings_sheet.xml
@@ -249,6 +249,15 @@
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" />
+
+
+ app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon,pad_pages_vert_webtoon" />
Show page number
32-bit color
Crop borders
+ Vertical padding between pages
Use custom brightness
Use custom color filter
Color filter blend mode