From 8a1b8db614cb088b8e9eda04b56458eb36f5dcab Mon Sep 17 00:00:00 2001
From: Carlos <2092019+CarlosEsco@users.noreply.github.com>
Date: Sat, 2 May 2020 13:51:31 -0400
Subject: [PATCH] add xl option (#282)
---
.../kanade/tachiyomi/ui/library/LibraryController.kt | 8 +++++---
.../ui/source/browse/BrowseSourceController.kt | 8 +++++---
app/src/main/res/layout/display_bottom_sheet.xml | 12 ++++++++++++
app/src/main/res/values/strings.xml | 8 +++++---
4 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
index 144fc2b660..9824d8c721 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
@@ -433,9 +433,11 @@ class LibraryController(
)
} else {
recycler.columnWidth = when (preferences.gridSize().getOrDefault()) {
- 0 -> 1f
- 2 -> 1.66f
- else -> 1.25f
+ 1 -> 1f
+ 2 -> 1.25f
+ 3 -> 1.66f
+ 4 -> 3f
+ else -> .66f
}
recycler.updatePaddingRelative(
start = (if (alwaysShowScroller) 2 else 5).dpToPx,
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceController.kt
index 35d7a6299a..05467343b2 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceController.kt
@@ -168,9 +168,11 @@ open class BrowseSourceController(bundle: Bundle) :
} else {
(catalogue_view.inflate(R.layout.manga_recycler_autofit) as AutofitRecyclerView).apply {
columnWidth = when (preferences.gridSize().getOrDefault()) {
- 0 -> 1f
- 2 -> 1.66f
- else -> 1.25f
+ 1 -> 1f
+ 2 -> 1.25f
+ 3 -> 1.66f
+ 4 -> 3f
+ else -> .66f
}
(layoutManager as androidx.recyclerview.widget.GridLayoutManager).spanSizeLookup = object : androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup() {
diff --git a/app/src/main/res/layout/display_bottom_sheet.xml b/app/src/main/res/layout/display_bottom_sheet.xml
index 4429aa4759..bf341f2b17 100644
--- a/app/src/main/res/layout/display_bottom_sheet.xml
+++ b/app/src/main/res/layout/display_bottom_sheet.xml
@@ -75,6 +75,13 @@
+
+
+
Always show library fast scroll
Unread badges
Uniform covers
- Small
- Medium
- Large
+ XS
+ S
+ M
+ L
+ XL
Grid options
Hide badges
Show badges