Skip to content

Commit

Permalink
Fix progress bar colors when using dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelschattgen committed Nov 11, 2024
1 parent fcd4d52 commit c0e43c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/progress_horizontal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape>
<solid android:color="?attr/colorPrimaryAlternative"/>
<solid android:color="?attr/colorProgressbar"/>
<corners
android:topLeftRadius="0dp"
android:topRightRadius="2dp"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<attr name="dropdownStyle" format="reference" />
<attr name="colorFavorite" format="color" />
<attr name="colorPrimaryAlternative" format="color" />
<attr name="colorProgressbar" format="color" />
<attr name="colorOnDark" />
<attr name="colorSuccess" />
<attr name="colorOnSurfaceDim" />
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<!-- Custom colors -->
<item name="colorFavorite">@color/aegis_theme_all_favorite</item>
<item name="colorPrimaryAlternative">?attr/colorPrimary</item>
<item name="colorProgressbar">?attr/colorPrimaryAlternative</item>
<item name="colorOnDark">@android:color/white</item>
<item name="colorSuccess">@color/aegis_theme_light_success</item>
<item name="colorOnSurfaceDim">@color/aegis_theme_light_onSurfaceDim</item>
Expand Down Expand Up @@ -126,6 +127,7 @@
<!-- Custom colors -->
<item name="colorFavorite">@color/aegis_theme_all_favorite</item>
<item name="colorPrimaryAlternative">?attr/colorPrimaryInverse</item>
<item name="colorProgressbar">?attr/colorPrimaryAlternative</item>
<item name="colorOnDark">@android:color/white</item>
<item name="colorSuccess">@color/aegis_theme_dark_success</item>
<item name="colorOnSurfaceDim">@color/aegis_theme_dark_onSurfaceDim</item>
Expand Down Expand Up @@ -157,16 +159,16 @@
<item name="colorSurfaceDim">#000000</item>
<item name="colorSurfaceBright">#000000</item>
<item name="colorCode">@android:color/white</item>

<item name="colorProgressbar">@android:color/white</item>
</style>

<style name="ThemeOverlay.Aegis.Dynamic.Dark" parent="ThemeOverlay.Material3.DynamicColors.Dark">
<item name="colorPrimaryAlternative">?attr/colorPrimary</item>
</style>

<style name="ThemeOverlay.Aegis.Dynamic.Amoled" parent="ThemeOverlay.Material3.DynamicColors.Dark">
<!-- Setting android:colorBackground to #000000 on API 28 and below causes smearing -->
<item name="android:colorBackground">@android:color/black</item>
<item name="colorPrimaryAlternative">@android:color/white</item>
<item name="colorSurface">#000000</item>
<item name="colorSurfaceVariant">#000000</item>
<item name="colorSurfaceContainerHighest">#000000</item>
Expand All @@ -177,6 +179,8 @@
<item name="colorSurfaceDim">#000000</item>
<item name="colorSurfaceBright">#000000</item>
<item name="colorCode">@android:color/white</item>

<item name="colorProgressbar">@android:color/white</item>
</style>

<style name="Theme.Aegis.Light" parent="Base.Theme.Aegis.Light">
Expand Down

0 comments on commit c0e43c6

Please sign in to comment.