lets use a dark color at B&W theme dialogs, not pure black

This commit is contained in:
tibbi 2022-03-21 12:07:37 +01:00
parent a70a1d6923
commit 0fa6436b5f

View file

@ -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()