ui: do not enforce contrast after api 29
Set the enforce*BarContrast methods to false above API 29, so we can use fully transparent navigation and status bars. Previously, we used a mostly transparent color for such, but now, we can use a completely transparent color without it being changed to match contrast.
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Note: Not actually transparent, making it transparent would actually make it translucent
|
||||
TODO: Can actually disable the contrast check on some newer versions -->
|
||||
<color name="chrome_transparent">#01fafafa</color>
|
||||
<!-- Used on devices when we cannot set dark/light mode on the system bars. -->
|
||||
<color name="chrome_translucent">#80000000</color>
|
||||
<color name="remote_translucent">#80ffffff</color>
|
||||
|
||||
<!--
|
||||
Used on devices when we can use "transparent" system bars, but fully transparent colors
|
||||
would cause the status bar to become translucent.
|
||||
-->
|
||||
<color name="chrome_transparent_ish">#01fafafa</color>
|
||||
|
||||
<color name="widget_surface">@color/material_dynamic_primary95</color>
|
||||
<color name="widget_surface_inverse">@color/material_dynamic_neutral20</color>
|
||||
|
||||
@@ -1,34 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Master parent theme -->
|
||||
<!-- TODO: Make the app theme blue before dynamic colors -->
|
||||
<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>
|
||||
<item name="android:navigationBarColor">@color/chrome_translucent</item>
|
||||
</style>
|
||||
<style name="Theme.Auxio.V29" parent="Theme.Auxio.V27" />
|
||||
|
||||
<!-- Base theme -->
|
||||
<style name="Theme.Auxio.Base" parent="Theme.Auxio.V27">
|
||||
<!-- Values -->
|
||||
<item name="colorAccent">?attr/colorSecondary</item>
|
||||
<item name="colorOutline">@color/overlay_stroke</item>
|
||||
<item name="indicatorColor">?attr/colorPrimary</item>
|
||||
<item name="colorControlActivated">?attr/colorPrimary</item>
|
||||
|
||||
<!-- Fix dumb default android behavior -->
|
||||
<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>
|
||||
<item name="android:textColorHighlightInverse">@color/overlay_text_highlight_inverse</item>
|
||||
|
||||
<style name="Theme.Auxio.Base" parent="Theme.Auxio.V29">
|
||||
<!-- Material configuration -->
|
||||
<item name="colorOutline">@color/overlay_stroke</item>
|
||||
<item name="toolbarStyle">@style/Widget.Auxio.Toolbar</item>
|
||||
<item name="materialAlertDialogTheme">@style/Theme.Auxio.Dialog</item>
|
||||
<item name="sliderStyle">@style/Widget.Auxio.Slider</item>
|
||||
@@ -56,6 +40,16 @@
|
||||
<item name="textAppearanceBodyLarge">@style/TextAppearance.Auxio.BodyLarge</item>
|
||||
<item name="textAppearanceBodyMedium">@style/TextAppearance.Auxio.BodyMedium</item>
|
||||
<item name="textAppearanceBodySmall">@style/TextAppearance.Auxio.BodySmall</item>
|
||||
|
||||
<!-- Fix dumb default android behavior -->
|
||||
<item name="android:scrollbars">none</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="colorControlActivated">?attr/colorPrimary</item>
|
||||
|
||||
<!-- Work around hard-coded text highlight colors in the default Material3 theme -->
|
||||
<item name="android:textColorHighlight">@color/overlay_text_highlight</item>
|
||||
<item name="android:textColorHighlightInverse">@color/overlay_text_highlight_inverse</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Auxio.App" parent="@style/Theme.Auxio.Blue" />
|
||||
|
||||
Reference in New Issue
Block a user