Center padding option for Surface Duos/other foldables (#634)

* Add center margin option for horizontal dual page view

* Update readme to make the point of the fork obvious

* Center margins now added to large single images that would display in place of two smaller pages

* Cleanup; reworked preference into an int selector to specify which margins to add

* Suggested fixes and and readme reversion which somehow got skipped last commit

* Missed the build block in readme. Oops.
This commit is contained in:
bucketmouse
2022-07-28 16:03:09 -07:00
committed by GitHub
parent 5807920636
commit 89600fc7aa
11 changed files with 129 additions and 17 deletions
@@ -116,6 +116,13 @@
android:textColor="?android:attr/textColorSecondary"
android:text="@string/invert_double_pages" />
<eu.kanade.tachiyomi.widget.MaterialSpinnerView
android:id="@+id/center_margin_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/center_margin_types"
app:title="@string/pref_center_margin" />
<androidx.constraintlayout.widget.Group
android:id="@+id/tapping_prefs_group"
android:layout_width="wrap_content"
+7
View File
@@ -21,4 +21,11 @@
<item>@string/double_pages</item>
<item>@string/automatic_orientation</item>
</string-array>
<string-array name="center_margin_types">
<item>@string/center_margin_none</item>
<item>@string/center_margin_double_page</item>
<item>@string/center_margin_wide_page</item>
<item>@string/center_margin_double_and_wide_page</item>
</string-array>
</resources>
+9
View File
@@ -314,6 +314,15 @@
<string name="automatic_can_still_switch">While using automatic page layout, you can still switch between layouts while reading without overriding this setting</string>
<string name="invert_double_pages">Invert double pages</string>
<!-- Center margin -->
<string name="center_margin">Center Margin</string>
<string name="center_margin_none">None</string>
<string name="center_margin_double_page">Add to double Page</string>
<string name="center_margin_wide_page">Add to wide Page</string>
<string name="center_margin_double_and_wide_page">Add to both</string>
<string name="pref_center_margin">Center margin type</string>
<string name="pref_center_margin_summary">Insert spacer to accommodate deadspace on foldable devices.</string>
<!-- Manga Page -->
<!-- Manga Info -->
<string name="az_recommends">See Recommendations</string>