Updates to full cover dialog

* Using smaller buttons for save/share
* Lowered the left/right margins of the cover
* Vertically centered the cover more
This commit is contained in:
Jays2Kings 2021-08-26 16:14:52 -04:00
parent 464b0eb822
commit 83729d9415
3 changed files with 28 additions and 25 deletions

View File

@ -89,16 +89,16 @@ class FullCoverDialog(val controller: MangaDetailsController, drawable: Drawable
// begins, it will position the zoomed-in view in the place of the
// thumbnail.
thumbView.alpha = 0f
val defMargin = 16.dpToPx
if (Build.VERSION.SDK_INT >= 31) {
val defMargin = 8.dpToPx
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
activity?.window?.decorView?.animateBlur(1f, 20f, 50)?.start()
}
expandedImageView.updateLayoutParams<ConstraintLayout.LayoutParams> {
height = 0
width = 0
topMargin = defMargin
leftMargin = defMargin
rightMargin = defMargin
topMargin = defMargin + 48.dpToPx
marginStart = defMargin
marginEnd = defMargin
bottomMargin = defMargin
horizontalBias = 0.5f
verticalBias = 0.5f

View File

@ -29,7 +29,6 @@
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -46,7 +45,7 @@
app:layout_constraintBottom_toBottomOf="parent">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_save"
style="@style/Widget.Tachiyomi.Button.ActionButton.White"
style="@style/Widget.Tachiyomi.Button.ActionButton.White.Landscape"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
@ -57,7 +56,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_share"
style="@style/Widget.Tachiyomi.Button.ActionButton.White"
style="@style/Widget.Tachiyomi.Button.ActionButton.White.Landscape"
app:layout_constraintStart_toEndOf="@id/btn_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -254,6 +254,10 @@
<item name="android:textSize">12sp</item>
</style>
<style name="Widget.Tachiyomi.Button.ActionButton.White.Landscape">
<item name="iconGravity">start</item>
</style>
<style name="Widget.Tachiyomi.Button.ActionButton.White">
<item name="iconTint">@color/md_white_1000</item>
<item name="android:textColor">@color/md_white_1000</item>