mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-30 05:47:57 +01:00
Add support for margins in Webtoon view
On larger tablets, matching the page width to the screen width in webtoon mode causes eye strain due to the image looking so magnified. Adding a page margin to the image can resolve this by effectively scaling the image down.
This commit is contained in:
@@ -240,6 +240,25 @@
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/margin_ratio_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_reader_margin"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/verticalcenter"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/margin_ratio_webtoon"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/margin_ratio_webtoon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:entries="@array/margin_ratio"
|
||||
app:layout_constraintLeft_toRightOf="@id/verticalcenter"
|
||||
app:layout_constraintRight_toRightOf="@id/spinner_end"
|
||||
app:layout_constraintTop_toBottomOf="@id/crop_borders_webtoon"/>
|
||||
|
||||
<!-- Groups of preferences -->
|
||||
|
||||
<android.support.constraint.Group
|
||||
@@ -255,7 +274,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon" />
|
||||
app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon,margin_ratio_text,margin_ratio_webtoon" />
|
||||
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/verticalcenter"
|
||||
|
||||
Reference in New Issue
Block a user