Tint alert dialogs
Apply the accent color to alert dialog buttons. Note that without "android:windowMinWidthMajor" and "android:windowMinWidthMinor" attributes dialog width is calculated incorrectly resulting in visual artifacts.
This commit is contained in:
parent
4b699d5376
commit
04e8b591ab
14
F-Droid/res/values-v11/styles.xml
Normal file
14
F-Droid/res/values-v11/styles.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AlertDialogBaseThemeDark" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
|
||||
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogBaseThemeLight" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
|
||||
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -6,6 +6,7 @@
|
||||
<item name="colorPrimary">@color/fdroid_blue</item>
|
||||
<item name="colorPrimaryDark">@color/fdroid_blue_dark</item>
|
||||
<item name="colorAccent">@color/fdroid_green</item>
|
||||
<item name="alertDialogTheme">@style/AlertDialogThemeDark</item>
|
||||
</style>
|
||||
|
||||
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
@ -14,17 +15,13 @@
|
||||
<item name="colorPrimary">@color/fdroid_blue</item>
|
||||
<item name="colorPrimaryDark">@color/fdroid_blue_dark</item>
|
||||
<item name="colorAccent">@color/fdroid_green</item>
|
||||
<item name="alertDialogTheme">@style/AlertDialogThemeLight</item>
|
||||
</style>
|
||||
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="red">#FFFF0000</color>
|
||||
|
||||
<style name="AboutDialogLight" parent="@android:style/Theme.Dialog">
|
||||
<item name="@android:windowBackground">@color/black</item>
|
||||
<item name="@android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
||||
<!-- customizations that are not API-level specific go here. -->
|
||||
</style>
|
||||
@ -33,6 +30,16 @@
|
||||
<!-- customizations that are not API-level specific go here. -->
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogBaseThemeDark" parent="Theme.AppCompat.Dialog.Alert" />
|
||||
<style name="AlertDialogThemeDark" parent="AlertDialogBaseThemeDark">
|
||||
<item name="colorAccent">@color/fdroid_green</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogBaseThemeLight" parent="Theme.AppCompat.Light.Dialog.Alert" />
|
||||
<style name="AlertDialogThemeLight" parent="AlertDialogBaseThemeLight">
|
||||
<item name="colorAccent">@color/fdroid_green</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard" parent="AppThemeDark">
|
||||
<item name="android:windowBackground">@drawable/swap_window_background</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user