fix: Use colorPrimary for checked/selected dialog items (#825)

RadioButton and CheckBox color the selected radio button or check box
using `colorPrimary`. For some reason Material dialogs don't, and use
`colorSecondary` for this (and only this), which leads to visual
inconstencices through the app.

Fix this by setting `colorSecondary` to `colorPrimary` to force it.
This commit is contained in:
Nik Clayton 2024-07-22 16:19:08 +02:00 committed by GitHub
parent 6b55d107c1
commit 92e5304b84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,9 @@
<style name="AppDialog" parent="@style/ThemeOverlay.Material3.Dialog.Alert"> <style name="AppDialog" parent="@style/ThemeOverlay.Material3.Dialog.Alert">
<item name="android:letterSpacing">0</item> <item name="android:letterSpacing">0</item>
<item name="dialogCornerRadius">8dp</item> <item name="dialogCornerRadius">8dp</item>
<!-- Sets the colour of the radio button or checkbox in a dialog. -->
<item name="colorSecondary">?colorPrimary</item>
</style> </style>
<style name="AppDialogFragmentStyle" parent="@style/ThemeOverlay.MaterialComponents.Dialog"> <style name="AppDialogFragmentStyle" parent="@style/ThemeOverlay.MaterialComponents.Dialog">