From 38d131be37c674544b309248271e4e528d51d0f9 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Fri, 17 Dec 2021 21:32:42 +0700 Subject: [PATCH] Workaround cleanup (#6350) * Remove material-components workaround that was fixed upstream * Remove unused toolbar workaround * Fix cover dialog navigation icon --- .../appbar/HideToolbarOnScrollBehavior.kt | 93 ------------------- .../material/appbar/TachiyomiAppBarLayout.kt | 8 +- .../shape/MaterialShapeDrawableFix.kt | 10 -- .../tachiyomi/ui/webview/WebViewActivity.kt | 2 +- .../main/res/color/ripple_toolbar_fainter.xml | 2 +- app/src/main/res/color/tabs_selector.xml | 11 --- .../res/layout/extension_detail_header.xml | 2 - app/src/main/res/layout/main_activity.xml | 2 +- .../res/layout/manga_full_cover_dialog.xml | 2 +- app/src/main/res/layout/pref_more_header.xml | 4 +- app/src/main/res/layout/pref_theme_item.xml | 4 +- app/src/main/res/layout/reader_activity.xml | 16 ++-- app/src/main/res/menu/browse_extensions.xml | 4 +- app/src/main/res/menu/browse_migrate.xml | 4 +- app/src/main/res/menu/browse_sources.xml | 4 +- app/src/main/res/menu/category_selection.xml | 4 +- app/src/main/res/menu/chapter_selection.xml | 14 +-- app/src/main/res/menu/extension_details.xml | 2 +- app/src/main/res/menu/full_cover.xml | 6 +- app/src/main/res/menu/generic_selection.xml | 4 +- app/src/main/res/menu/global_search.xml | 2 +- app/src/main/res/menu/history.xml | 4 +- app/src/main/res/menu/library.xml | 6 +- app/src/main/res/menu/library_selection.xml | 10 +- app/src/main/res/menu/manga.xml | 4 +- app/src/main/res/menu/reader.xml | 4 +- app/src/main/res/menu/settings_main.xml | 2 +- app/src/main/res/menu/settings_tracking.xml | 2 +- app/src/main/res/menu/source_browse.xml | 8 +- app/src/main/res/menu/updates.xml | 2 +- .../res/menu/updates_chapter_selection.xml | 12 +-- app/src/main/res/menu/webview.xml | 4 +- app/src/main/res/values/attrs.xml | 13 --- app/src/main/res/values/styles.xml | 13 +-- app/src/main/res/values/themes.xml | 7 -- 35 files changed, 70 insertions(+), 221 deletions(-) delete mode 100644 app/src/main/java/com/google/android/material/appbar/HideToolbarOnScrollBehavior.kt delete mode 100644 app/src/main/java/com/google/android/material/shape/MaterialShapeDrawableFix.kt delete mode 100644 app/src/main/res/color/tabs_selector.xml diff --git a/app/src/main/java/com/google/android/material/appbar/HideToolbarOnScrollBehavior.kt b/app/src/main/java/com/google/android/material/appbar/HideToolbarOnScrollBehavior.kt deleted file mode 100644 index 552b391a47..0000000000 --- a/app/src/main/java/com/google/android/material/appbar/HideToolbarOnScrollBehavior.kt +++ /dev/null @@ -1,93 +0,0 @@ -package com.google.android.material.appbar - -import android.animation.ValueAnimator -import android.view.View -import android.view.animation.DecelerateInterpolator -import androidx.appcompat.widget.Toolbar -import androidx.coordinatorlayout.widget.CoordinatorLayout -import androidx.core.view.ViewCompat -import androidx.core.view.marginTop -import eu.kanade.tachiyomi.util.system.animatorDurationScale -import eu.kanade.tachiyomi.util.view.findChild -import kotlin.math.roundToLong - -/** - * Hide toolbar on scroll behavior for [AppBarLayout]. - * - * Inside this package to access some package-private methods. - */ -class HideToolbarOnScrollBehavior : AppBarLayout.Behavior() { - - @ViewCompat.NestedScrollType - private var lastStartedType: Int = 0 - - private var offsetAnimator: ValueAnimator? = null - - private var toolbarHeight: Int = 0 - - override fun onStartNestedScroll( - parent: CoordinatorLayout, - child: AppBarLayout, - directTargetChild: View, - target: View, - nestedScrollAxes: Int, - type: Int - ): Boolean { - lastStartedType = type - offsetAnimator?.cancel() - return super.onStartNestedScroll(parent, child, directTargetChild, target, nestedScrollAxes, type) - } - - override fun onStopNestedScroll( - parent: CoordinatorLayout, - layout: AppBarLayout, - target: View, - type: Int - ) { - super.onStopNestedScroll(parent, layout, target, type) - if (toolbarHeight == 0) { - toolbarHeight = layout.findChild()?.height ?: 0 - } - if (lastStartedType == ViewCompat.TYPE_TOUCH || type == ViewCompat.TYPE_NON_TOUCH) { - animateToolbarVisibility( - parent, - layout, - getTopBottomOffsetForScrollingSibling(layout) > -toolbarHeight / 2 - ) - } - } - - override fun onFlingFinished(parent: CoordinatorLayout, layout: AppBarLayout) { - super.onFlingFinished(parent, layout) - animateToolbarVisibility( - parent, - layout, - getTopBottomOffsetForScrollingSibling(layout) > -toolbarHeight / 2 - ) - } - - private fun getTopBottomOffsetForScrollingSibling(abl: AppBarLayout): Int { - return topBottomOffsetForScrollingSibling - abl.marginTop - } - - private fun animateToolbarVisibility( - coordinatorLayout: CoordinatorLayout, - child: AppBarLayout, - isVisible: Boolean - ) { - val current = getTopBottomOffsetForScrollingSibling(child) - val target = if (isVisible) 0 else -toolbarHeight - if (current == target) return - - offsetAnimator?.cancel() - offsetAnimator = ValueAnimator().apply { - interpolator = DecelerateInterpolator() - duration = (150 * child.context.animatorDurationScale).roundToLong() - addUpdateListener { - setHeaderTopBottomOffset(coordinatorLayout, child, it.animatedValue as Int) - } - setIntValues(current, target) - start() - } - } -} diff --git a/app/src/main/java/com/google/android/material/appbar/TachiyomiAppBarLayout.kt b/app/src/main/java/com/google/android/material/appbar/TachiyomiAppBarLayout.kt index 6cc8239b39..1627c5d194 100644 --- a/app/src/main/java/com/google/android/material/appbar/TachiyomiAppBarLayout.kt +++ b/app/src/main/java/com/google/android/material/appbar/TachiyomiAppBarLayout.kt @@ -7,12 +7,10 @@ import android.content.Context import android.util.AttributeSet import android.widget.TextView import androidx.annotation.FloatRange -import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.lifecycle.coroutineScope import androidx.lifecycle.findViewTreeLifecycleOwner import com.google.android.material.animation.AnimationUtils import com.google.android.material.shape.MaterialShapeDrawable -import com.google.android.material.shape.getStateAlpha import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.view.findChild import kotlinx.coroutines.flow.launchIn @@ -53,7 +51,7 @@ class TachiyomiAppBarLayout @JvmOverloads constructor( private val offsetListener = OnOffsetChangedListener { appBarLayout, verticalOffset -> // Show status bar foreground when offset val foreground = (appBarLayout?.statusBarForeground as? MaterialShapeDrawable) ?: return@OnOffsetChangedListener - val start = foreground.getStateAlpha() + val start = foreground.alpha val end = if (verticalOffset != 0) 255 else 0 statusBarForegroundAnimator?.cancel() @@ -81,8 +79,6 @@ class TachiyomiAppBarLayout @JvmOverloads constructor( } } - override fun getBehavior(): CoordinatorLayout.Behavior = HideToolbarOnScrollBehavior() - /** * Disabled. Lift on scroll is handled manually with [eu.kanade.tachiyomi.widget.TachiyomiCoordinatorLayout] */ @@ -154,7 +150,7 @@ class TachiyomiAppBarLayout @JvmOverloads constructor( } val transparent = if (lifted) false else isTransparentWhenNotLifted - val fromAlpha = (background as? MaterialShapeDrawable)?.getStateAlpha() ?: background.alpha + val fromAlpha = (background as? MaterialShapeDrawable)?.alpha ?: background.alpha val toAlpha = if (transparent) 0 else 255 if (fromAlpha != toAlpha) { ValueAnimator.ofInt(fromAlpha, toAlpha).apply { diff --git a/app/src/main/java/com/google/android/material/shape/MaterialShapeDrawableFix.kt b/app/src/main/java/com/google/android/material/shape/MaterialShapeDrawableFix.kt deleted file mode 100644 index 5abf2ef18c..0000000000 --- a/app/src/main/java/com/google/android/material/shape/MaterialShapeDrawableFix.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.android.material.shape - -/** - * Use this instead of [MaterialShapeDrawable.getAlpha]. - * - * https://github.com/material-components/material-components-android/issues/1796 - */ -fun MaterialShapeDrawable.getStateAlpha(): Int { - return (constantState as? MaterialShapeDrawable.MaterialShapeDrawableState)?.alpha ?: alpha -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index 83f46f8d6a..4ebcf86ec1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -157,7 +157,7 @@ class WebViewActivity : BaseViewBindingActivity() { backItem?.isEnabled = binding.webview.canGoBack() forwardItem?.isEnabled = binding.webview.canGoForward() - val iconTintColor = getResourceColor(R.attr.colorOnToolbar) + val iconTintColor = getResourceColor(R.attr.colorOnSurface) val translucentIconTintColor = ColorUtils.setAlphaComponent(iconTintColor, 127) backItem?.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor) diff --git a/app/src/main/res/color/ripple_toolbar_fainter.xml b/app/src/main/res/color/ripple_toolbar_fainter.xml index 67e2f7f24b..e7fb4ba66b 100644 --- a/app/src/main/res/color/ripple_toolbar_fainter.xml +++ b/app/src/main/res/color/ripple_toolbar_fainter.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/res/color/tabs_selector.xml b/app/src/main/res/color/tabs_selector.xml deleted file mode 100644 index 7b417175d3..0000000000 --- a/app/src/main/res/color/tabs_selector.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/app/src/main/res/layout/extension_detail_header.xml b/app/src/main/res/layout/extension_detail_header.xml index 51e3ef4ca8..5a7eb8e481 100644 --- a/app/src/main/res/layout/extension_detail_header.xml +++ b/app/src/main/res/layout/extension_detail_header.xml @@ -20,8 +20,6 @@ + app:layout_scrollFlags="scroll|enterAlways|snap" /> - @@ -13,7 +13,7 @@ android:layout_height="56dp" android:layout_gravity="center" app:srcCompat="@drawable/ic_tachi" - app:tint="?attr/colorOnToolbar" + app:tint="?attr/colorOnSurface" tools:ignore="ContentDescription" /> diff --git a/app/src/main/res/layout/pref_theme_item.xml b/app/src/main/res/layout/pref_theme_item.xml index f66384e239..4a61de31c3 100644 --- a/app/src/main/res/layout/pref_theme_item.xml +++ b/app/src/main/res/layout/pref_theme_item.xml @@ -30,7 +30,6 @@ android:id="@+id/top_nav" android:layout_width="0dp" android:layout_height="32dp" - android:background="?attr/colorToolbar" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -44,7 +43,7 @@ app:layout_constraintBottom_toBottomOf="@+id/top_nav" app:layout_constraintStart_toStartOf="@+id/top_nav" app:layout_constraintTop_toTopOf="@+id/top_nav" - app:tint="?attr/colorOnToolbar" /> + app:tint="?attr/colorOnSurface" /> diff --git a/app/src/main/res/layout/reader_activity.xml b/app/src/main/res/layout/reader_activity.xml index 75e43fed99..243590e1c2 100644 --- a/app/src/main/res/layout/reader_activity.xml +++ b/app/src/main/res/layout/reader_activity.xml @@ -81,7 +81,7 @@ android:contentDescription="@string/action_previous_chapter" android:padding="@dimen/screen_edge_margin" app:srcCompat="@drawable/ic_skip_previous_24dp" - app:tint="?attr/colorOnToolbar" /> + app:tint="?attr/colorOnSurface" /> @@ -119,7 +119,7 @@ android:layout_width="32dp" android:layout_height="match_parent" android:gravity="center" - android:textColor="?attr/colorOnToolbar" + android:textColor="?attr/colorOnSurface" android:textSize="15sp" tools:text="15" /> @@ -133,7 +133,7 @@ android:contentDescription="@string/action_next_chapter" android:padding="@dimen/screen_edge_margin" app:srcCompat="@drawable/ic_skip_next_24dp" - app:tint="?attr/colorOnToolbar" /> + app:tint="?attr/colorOnSurface" /> @@ -156,7 +156,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/ic_reader_default_24dp" - app:tint="?attr/colorOnToolbar" /> + app:tint="?attr/colorOnSurface" /> + app:tint="?attr/colorOnSurface" /> + app:tint="?attr/colorOnSurface" /> + app:tint="?attr/colorOnSurface" /> diff --git a/app/src/main/res/menu/browse_extensions.xml b/app/src/main/res/menu/browse_extensions.xml index 7d83b99ac0..67cdcdc96d 100644 --- a/app/src/main/res/menu/browse_extensions.xml +++ b/app/src/main/res/menu/browse_extensions.xml @@ -6,14 +6,14 @@ android:icon="@drawable/ic_search_24dp" android:title="@string/action_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" /> diff --git a/app/src/main/res/menu/browse_migrate.xml b/app/src/main/res/menu/browse_migrate.xml index eb6e06f9fb..26455a0f4e 100644 --- a/app/src/main/res/menu/browse_migrate.xml +++ b/app/src/main/res/menu/browse_migrate.xml @@ -5,7 +5,7 @@ android:id="@+id/action_sort" android:icon="@drawable/ic_sort_24dp" android:title="@string/action_sort" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" > diff --git a/app/src/main/res/menu/browse_sources.xml b/app/src/main/res/menu/browse_sources.xml index 3717488773..317e0f4f1d 100644 --- a/app/src/main/res/menu/browse_sources.xml +++ b/app/src/main/res/menu/browse_sources.xml @@ -6,14 +6,14 @@ android:icon="@drawable/ic_travel_explore_24dp" android:title="@string/action_global_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" /> diff --git a/app/src/main/res/menu/category_selection.xml b/app/src/main/res/menu/category_selection.xml index 40a9491d86..95ed1acb98 100644 --- a/app/src/main/res/menu/category_selection.xml +++ b/app/src/main/res/menu/category_selection.xml @@ -6,14 +6,14 @@ android:id="@+id/action_edit" android:icon="@drawable/ic_edit_24dp" android:title="@string/action_edit" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/chapter_selection.xml b/app/src/main/res/menu/chapter_selection.xml index 8e33d40569..a75bcf3511 100644 --- a/app/src/main/res/menu/chapter_selection.xml +++ b/app/src/main/res/menu/chapter_selection.xml @@ -7,7 +7,7 @@ android:id="@+id/action_download" android:icon="@drawable/ic_get_app_24dp" android:title="@string/action_download" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -15,7 +15,7 @@ android:id="@+id/action_delete" android:icon="@drawable/ic_delete_24dp" android:title="@string/action_delete" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -23,7 +23,7 @@ android:id="@+id/action_bookmark" android:icon="@drawable/ic_bookmark_border_24dp" android:title="@string/action_bookmark" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -31,7 +31,7 @@ android:id="@+id/action_remove_bookmark" android:icon="@drawable/ic_bookmark_24dp" android:title="@string/action_remove_bookmark" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -39,7 +39,7 @@ android:id="@+id/action_mark_as_read" android:icon="@drawable/ic_done_24dp" android:title="@string/action_mark_as_read" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -47,7 +47,7 @@ android:id="@+id/action_mark_as_unread" android:icon="@drawable/ic_done_outline_24dp" android:title="@string/action_mark_as_unread" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -55,7 +55,7 @@ android:id="@+id/action_mark_previous_as_read" android:icon="@drawable/ic_done_prev_24dp" android:title="@string/action_mark_previous_as_read" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> diff --git a/app/src/main/res/menu/extension_details.xml b/app/src/main/res/menu/extension_details.xml index d31bb377fd..12586b3272 100644 --- a/app/src/main/res/menu/extension_details.xml +++ b/app/src/main/res/menu/extension_details.xml @@ -5,7 +5,7 @@ android:id="@+id/action_history" android:icon="@drawable/ic_history_24dp" android:title="@string/whats_new" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/generic_selection.xml b/app/src/main/res/menu/generic_selection.xml index 0c8df145c9..10d32b675d 100644 --- a/app/src/main/res/menu/generic_selection.xml +++ b/app/src/main/res/menu/generic_selection.xml @@ -6,14 +6,14 @@ android:id="@+id/action_select_all" android:icon="@drawable/ic_select_all_24dp" android:title="@string/action_select_all" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/global_search.xml b/app/src/main/res/menu/global_search.xml index 743391d807..f3fdb10679 100644 --- a/app/src/main/res/menu/global_search.xml +++ b/app/src/main/res/menu/global_search.xml @@ -6,7 +6,7 @@ android:icon="@drawable/ic_search_24dp" android:title="@string/action_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" /> diff --git a/app/src/main/res/menu/history.xml b/app/src/main/res/menu/history.xml index bc04d8389c..284cd197a4 100644 --- a/app/src/main/res/menu/history.xml +++ b/app/src/main/res/menu/history.xml @@ -7,14 +7,14 @@ android:icon="@drawable/ic_search_24dp" android:title="@string/action_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom|collapseActionView" /> diff --git a/app/src/main/res/menu/library.xml b/app/src/main/res/menu/library.xml index 99f38a5bad..d57d0a345d 100644 --- a/app/src/main/res/menu/library.xml +++ b/app/src/main/res/menu/library.xml @@ -8,21 +8,21 @@ android:icon="@drawable/ic_search_24dp" android:title="@string/action_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" /> diff --git a/app/src/main/res/menu/library_selection.xml b/app/src/main/res/menu/library_selection.xml index 0d109bbc17..ea97c2b84d 100644 --- a/app/src/main/res/menu/library_selection.xml +++ b/app/src/main/res/menu/library_selection.xml @@ -7,7 +7,7 @@ android:id="@+id/action_move_to_category" android:icon="@drawable/ic_label_24dp" android:title="@string/action_move_category" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -15,7 +15,7 @@ android:id="@+id/action_download_unread" android:icon="@drawable/ic_get_app_24dp" android:title="@string/action_download_unread" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -23,7 +23,7 @@ android:id="@+id/action_mark_as_read" android:icon="@drawable/ic_done_24dp" android:title="@string/action_mark_as_read" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -31,7 +31,7 @@ android:id="@+id/action_mark_as_unread" android:icon="@drawable/ic_done_outline_24dp" android:title="@string/action_mark_as_unread" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -39,7 +39,7 @@ android:id="@+id/action_delete" android:icon="@drawable/ic_delete_24dp" android:title="@string/action_delete" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> diff --git a/app/src/main/res/menu/manga.xml b/app/src/main/res/menu/manga.xml index b1227e72c0..f635cf810b 100644 --- a/app/src/main/res/menu/manga.xml +++ b/app/src/main/res/menu/manga.xml @@ -6,14 +6,14 @@ android:id="@+id/action_share" android:icon="@drawable/ic_share_24dp" android:title="@string/action_share" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/settings_main.xml b/app/src/main/res/menu/settings_main.xml index 743391d807..f3fdb10679 100644 --- a/app/src/main/res/menu/settings_main.xml +++ b/app/src/main/res/menu/settings_main.xml @@ -6,7 +6,7 @@ android:icon="@drawable/ic_search_24dp" android:title="@string/action_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" /> diff --git a/app/src/main/res/menu/settings_tracking.xml b/app/src/main/res/menu/settings_tracking.xml index a7e77dd430..00d6074211 100644 --- a/app/src/main/res/menu/settings_tracking.xml +++ b/app/src/main/res/menu/settings_tracking.xml @@ -5,7 +5,7 @@ android:id="@+id/action_tracking_help" android:icon="@drawable/ic_help_24dp" android:title="@string/tracking_guide" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/source_browse.xml b/app/src/main/res/menu/source_browse.xml index 0519ac7dd6..ec8e115b62 100644 --- a/app/src/main/res/menu/source_browse.xml +++ b/app/src/main/res/menu/source_browse.xml @@ -6,13 +6,13 @@ android:icon="@drawable/ic_search_24dp" android:title="@string/action_search" app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="collapseActionView|ifRoom" /> @@ -33,14 +33,14 @@ android:id="@+id/action_open_in_web_view" android:icon="@drawable/ic_public_24dp" android:title="@string/action_open_in_web_view" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/updates.xml b/app/src/main/res/menu/updates.xml index 34bdd2fbb6..3f0bdb0ccf 100644 --- a/app/src/main/res/menu/updates.xml +++ b/app/src/main/res/menu/updates.xml @@ -7,7 +7,7 @@ android:id="@+id/action_update_library" android:icon="@drawable/ic_refresh_24dp" android:title="@string/action_update_library" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/updates_chapter_selection.xml b/app/src/main/res/menu/updates_chapter_selection.xml index 2a33878506..bc462c453d 100644 --- a/app/src/main/res/menu/updates_chapter_selection.xml +++ b/app/src/main/res/menu/updates_chapter_selection.xml @@ -7,7 +7,7 @@ android:id="@+id/action_download" android:icon="@drawable/ic_get_app_24dp" android:title="@string/action_download" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -15,7 +15,7 @@ android:id="@+id/action_delete" android:icon="@drawable/ic_delete_24dp" android:title="@string/action_delete" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -23,7 +23,7 @@ android:id="@+id/action_bookmark" android:icon="@drawable/ic_bookmark_border_24dp" android:title="@string/action_bookmark" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -31,7 +31,7 @@ android:id="@+id/action_remove_bookmark" android:icon="@drawable/ic_bookmark_24dp" android:title="@string/action_remove_bookmark" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -39,7 +39,7 @@ android:id="@+id/action_mark_as_read" android:icon="@drawable/ic_done_24dp" android:title="@string/action_mark_as_read" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> @@ -47,7 +47,7 @@ android:id="@+id/action_mark_as_unread" android:icon="@drawable/ic_done_outline_24dp" android:title="@string/action_mark_as_unread" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="always" tools:ignore="AlwaysShowAction" /> diff --git a/app/src/main/res/menu/webview.xml b/app/src/main/res/menu/webview.xml index 7b1ae01a84..bd8aa3ad22 100644 --- a/app/src/main/res/menu/webview.xml +++ b/app/src/main/res/menu/webview.xml @@ -6,14 +6,14 @@ android:id="@+id/action_web_back" android:icon="@drawable/ic_arrow_back_24dp" android:title="@string/action_webview_back" - app:iconTint="?attr/colorOnToolbar" + app:iconTint="?attr/colorOnSurface" app:showAsAction="ifRoom" /> - - - - - - - - - - - - - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index beb372265a..1bbe4ba57d 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -5,21 +5,12 @@ - - - - diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index cb8a330cad..c97a0db8e4 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -38,14 +38,11 @@ @color/errorContainer @color/onErrorContainer - ?attr/colorSurface - ?attr/colorOnSurface @color/divider_default @drawable/line_divider ?attr/colorSurfaceVariant - ?attr/colorControlHighlight gravity @@ -65,11 +62,9 @@ ?attr/borderlessButtonStyle 0.32 true - @style/Widget.Tachiyomi.ActionMode @style/Theme.Tachiyomi.ActionButton.Overflow @style/Theme.Tachiyomi.ActionMode.CloseButton @drawable/ic_close_24dp - @style/ThemeOverlay.Tachiyomi.ActionBar @style/PreferenceThemeOverlay.Tachiyomi @style/ThemeOverlay.Tachiyomi.BottomSheetDialog @style/Widget.Tachiyomi.Chip.Action @@ -84,7 +79,6 @@ @style/Widget.Tachiyomi.Switch @style/Widget.Tachiyomi.Slider @style/Widget.Material3.CardView.Elevated - false @color/filter_light @@ -125,7 +119,6 @@ @color/greenapple_inverseOnSurface @color/greenapple_inverseSurface @color/greenapple_primaryInverse - true