lets use a dark color at B&W theme dialogs, not pure black
This commit is contained in:
parent
a70a1d6923
commit
0fa6436b5f
1 changed files with 7 additions and 1 deletions
|
@ -1374,7 +1374,13 @@ fun Activity.setupDialogStuff(
|
||||||
getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(dialogButtonColor)
|
getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(dialogButtonColor)
|
||||||
getButton(AlertDialog.BUTTON_NEUTRAL).setTextColor(dialogButtonColor)
|
getButton(AlertDialog.BUTTON_NEUTRAL).setTextColor(dialogButtonColor)
|
||||||
|
|
||||||
val bgDrawable = resources.getColoredDrawableWithColor(R.drawable.dialog_bg, baseConfig.backgroundColor)
|
val backgroundColor = if (isBlackAndWhiteTheme()) {
|
||||||
|
resources.getColor(R.color.default_background_color)
|
||||||
|
} else {
|
||||||
|
baseConfig.backgroundColor
|
||||||
|
}
|
||||||
|
|
||||||
|
val bgDrawable = resources.getColoredDrawableWithColor(R.drawable.dialog_bg, backgroundColor)
|
||||||
window?.setBackgroundDrawable(bgDrawable)
|
window?.setBackgroundDrawable(bgDrawable)
|
||||||
}
|
}
|
||||||
callback?.invoke()
|
callback?.invoke()
|
||||||
|
|
Loading…
Reference in a new issue