Ripples patch (#5144)

* Combine ripple_dark and ripple_light

Fixes AMOLED theme and doesn't require two seperate items.

* Fix ripple for the new About icons

* Fixes nav/tab ripple in Dark Blue and Light Blue themes

* Theme some ripples using their Style instead
This commit is contained in:
Soitora 2021-05-23 00:08:48 +02:00 committed by GitHub
parent 8870ccb18c
commit 33dcdc1599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 23 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/rippleColor">
<item android:drawable="@color/backgroundDark" />
<item android:drawable="?android:attr/colorBackground" />
</ripple>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/rippleColor">
<item android:drawable="@color/backgroundLight" />
</ripple>

View File

@ -24,7 +24,6 @@
app:tabGravity="fill"
app:tabIndicatorColor="?attr/colorAccent"
app:tabMode="fixed"
app:tabRippleColor="?attr/rippleNavColor"
app:tabTextColor="@color/tabs_selector_background" />
<ImageButton

View File

@ -25,8 +25,7 @@
android:id="@+id/tabs"
style="@style/Theme.Widget.Tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabRippleColor="?attr/rippleNavColor" />
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/downloaded_only"

View File

@ -19,8 +19,7 @@
android:id="@+id/tabs"
style="@style/Theme.Widget.Tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabRippleColor="?attr/rippleNavColor" />
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/downloaded_only"

View File

@ -144,8 +144,7 @@
app:icon="@drawable/ic_favorite_border_24dp"
app:layout_constraintEnd_toStartOf="@+id/btn_tracking"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_info"
app:rippleColor="?attr/rippleColor" />
app:layout_constraintTop_toBottomOf="@+id/manga_info" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_tracking"
@ -158,7 +157,6 @@
app:layout_constraintEnd_toStartOf="@+id/btn_webview"
app:layout_constraintStart_toEndOf="@+id/btn_favorite"
app:layout_constraintTop_toBottomOf="@+id/manga_info"
app:rippleColor="?attr/rippleColor"
tools:visibility="visible" />
<com.google.android.material.button.MaterialButton
@ -173,7 +171,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/btn_tracking"
app:layout_constraintTop_toBottomOf="@+id/manga_info"
app:rippleColor="?attr/rippleColor"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -308,6 +308,7 @@
<item name="android:textAllCaps">false</item>
<item name="backgroundTint">@android:color/transparent</item>
<item name="rippleColor">?attr/rippleColor</item>
<item name="iconGravity">top</item>
<item name="iconTint">@color/button_action_selector</item>
@ -347,6 +348,7 @@
<item name="tabMinWidth">75dp</item>
<item name="tabMode">scrollable</item>
<item name="tabTextAppearance">@style/TextAppearance.Widget.Tab</item>
<item name="tabRippleColor">?attr/rippleNavColor</item>
</style>
@ -370,12 +372,8 @@
<!--===============-->
<!--Custom Selector-->
<!--===============-->
<style name="PreferenceThemeLight" parent="@style/PreferenceThemeOverlay">
<item name="android:selectableItemBackground">@drawable/ripple_light</item>
</style>
<style name="PreferenceThemeDark" parent="@style/PreferenceThemeOverlay">
<item name="android:selectableItemBackground">@drawable/ripple_dark</item>
<style name="PreferenceThemeCustom" parent="@style/PreferenceThemeOverlay">
<item name="android:selectableItemBackground">@drawable/ripple_background</item>
</style>
</resources>

View File

@ -59,7 +59,7 @@
<item name="actionModeCloseDrawable">@drawable/ic_close_24dp</item>
<item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents</item>
<item name="toolbarNavigationButtonStyle">@style/Theme.Toolbar.Navigation</item>
<item name="preferenceTheme">@style/PreferenceThemeLight</item>
<item name="preferenceTheme">@style/PreferenceThemeCustom</item>
<item name="dialogTheme">@style/Theme.AlertDialog.Light</item>
<item name="materialAlertDialogTheme">@style/Theme.AlertDialog.Light</item>
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
@ -104,6 +104,7 @@
<item name="colorAccentOnPrimary">@color/textColorPrimaryDark</item>
<item name="colorPrimaryVariant">@color/colorPrimaryDark</item>
<item name="colorFilterActive">@color/filterColorDark</item>
<item name="rippleNavColor">@color/md_white_1000_6</item>
<item name="actionBarTheme">@style/Theme.Toolbar.Light</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
@ -157,7 +158,7 @@
<item name="actionBarTheme">@style/Theme.Toolbar.Custom</item>
<item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents</item>
<item name="toolbarNavigationButtonStyle">@style/Theme.Toolbar.Navigation</item>
<item name="preferenceTheme">@style/PreferenceThemeDark</item>
<item name="preferenceTheme">@style/PreferenceThemeCustom</item>
<item name="dialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="materialAlertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
@ -193,6 +194,8 @@
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorAccentOnPrimary">@color/textColorPrimaryDark</item>
<item name="colorPrimaryVariant">@color/colorPrimary</item>
<item name="rippleNavColor">@color/md_white_1000_6</item>
</style>
<style name="Theme.Tachiyomi.Dark.Amoled">