style: rework dynamic colors

Allow the material library to handle dynamic colors.

Turns out I was mis-understanding how DynamicColor themes were meant to
be used by the material library. Turns out you can just inherit from it
and it will work perfectly fine. Refactor the V31 styles to remove our
insane shims and finally fix the slapdash dynamic color usage across
the main theme and widgets.
This commit is contained in:
OxygenCobalt
2022-02-21 17:07:06 -07:00
parent 9304e58190
commit 6fc3c9374c
10 changed files with 30 additions and 189 deletions
+4
View File
@@ -386,4 +386,8 @@
<color name="grey_on_surface_variant">#484848</color>
<color name="grey_surface_inverse">#1f1f1f</color>
<color name="grey_on_surface_inverse">#F0F0F0</color>
<color name="widget_surface">@color/material_dynamic_primary95</color>
<color name="widget_surface_inverse">@color/material_dynamic_neutral80</color>
<color name="widget_on_surface_inverse">@color/material_dynamic_neutral95</color>
</resources>
@@ -67,11 +67,6 @@
<item name="android:padding">@dimen/spacing_small</item>
</style>
<!-- A variant of PlaybackButton that is intended for buttons that show indicators -->
<style name="Widget.Auxio.PlaybackButton.Indicator.AppWidget" parent="Widget.Auxio.Button.AppWidget.V31">
<item name="android:minHeight">@dimen/size_btn_small</item>
</style>
<!-- Widget panel -->
<style name="Widget.Auxio.AppWidget.Panel" parent="">
<item name="android:layout_height">wrap_content</item>
+3 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Master parent theme -->
<style name="Theme.Auxio" parent="Theme.Material3.DayNight.NoActionBar" />
<style name="Theme.Auxio" parent="Theme.Material3.DynamicColors.DayNight" />
<!-- Template theme that handles edge-to-edge on other styles variants -->
<style name="Theme.Auxio.V27" parent="Theme.Auxio">
<item name="android:statusBarColor">@color/chrome_translucent</item>
@@ -22,6 +22,8 @@
<item name="android:colorBackground">?attr/colorSurface</item>
<item name="android:windowBackground">?attr/colorSurface</item>
<item name="android:scrollbars">none</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- Work around hard-coded text highlight colors in the default Material3 theme -->
<item name="android:textColorHighlight">@color/overlay_text_highlight</item>