Skip to content

Commit

Permalink
[M3][Dialog] Fix dialog icon color tint
Browse files Browse the repository at this point in the history
Only tints dialog icons when it's an SVG with colorControlNormal, which is the common default color used by vector icons.

PiperOrigin-RevId: 418666657
  • Loading branch information
drchen authored and afohrman committed Dec 29, 2021
1 parent a17af6e commit 246b340
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -130,7 +130,12 @@
<item name="android:layout_height">@dimen/m3_alert_dialog_icon_size</item>
<item name="android:layout_marginEnd" tools:ignore="NewApi">@dimen/m3_alert_dialog_icon_margin</item>
<item name="android:layout_marginRight">@dimen/m3_alert_dialog_icon_margin</item>
<item name="tint">?attr/colorSecondary</item>
<item name="android:theme">@style/ThemeOverlay.MaterialAlertDialog.Material3.Title.Icon</item>
</style>

<!-- Theme overlay to override icon colors if it's a vector drawable with default colors. -->
<style name="ThemeOverlay.MaterialAlertDialog.Material3.Title.Icon" parent="">
<item name="colorControlNormal">?attr/colorSecondary</item>
</style>

<style name="MaterialAlertDialog.Material3.Title.Icon.CenterStacked">
Expand Down

0 comments on commit 246b340

Please sign in to comment.