diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index fc07b11ff5..4e68037579 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -73,6 +73,7 @@ import eu.kanade.tachiyomi.util.system.launchIO import eu.kanade.tachiyomi.util.system.launchUI import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.setThemeAndNight +import eu.kanade.tachiyomi.util.system.spToPx import eu.kanade.tachiyomi.util.system.toast import eu.kanade.tachiyomi.util.view.collapse import eu.kanade.tachiyomi.util.view.compatToolTipText @@ -352,6 +353,14 @@ class ReaderActivity : else R.drawable.ic_book_open_variant_24dp ) ) + with(binding.readerNav) { + listOf(leftPageText, rightPageText).forEach { + it.updateLayoutParams { + val isCurrent = (viewer is R2LPagerViewer).xor(it === leftPageText) + width = if (isDoublePage && isCurrent) 48.spToPx else 32.spToPx + } + } + } binding.chaptersSheet.doublePage.compatToolTipText = getString( if (isDoublePage) R.string.switch_to_single diff --git a/app/src/main/res/layout/reader_nav.xml b/app/src/main/res/layout/reader_nav.xml index 8cbffd162c..546de349d1 100644 --- a/app/src/main/res/layout/reader_nav.xml +++ b/app/src/main/res/layout/reader_nav.xml @@ -22,7 +22,6 @@ android:visibility="gone" android:layout_width="40dp" android:layout_height="40dp" - android:layout_marginEnd="8dp" android:layout_gravity="center" android:layout_marginStart="56dp" /> @@ -33,7 +32,6 @@ android:layout_gravity="center" android:layout_marginStart="56dp" android:background="?selectableItemBackgroundBorderless" - android:layout_marginEnd="8dp" android:contentDescription="@string/previous_chapter" android:padding="@dimen/material_layout_keylines_screen_edge_margin" app:tint="?actionBarTintColor" @@ -46,12 +44,12 @@ + tools:text="1-2" /> \ No newline at end of file