[修复] 深色模式下电子书主题弹窗颜色错误 #396

This commit is contained in:
HapeLee
2025-12-03 01:10:18 +08:00
parent d66af9a1e5
commit 3e947844f9
@@ -143,29 +143,29 @@ internal class AndroidAlertBuilder(override val ctx: Context) : AlertBuilder<Ale
override fun build(): AlertDialog {
val dialog = builder.create()
if (AppConfig.isEInkMode) {
dialog.window?.run {
val attr = attributes
attr.dimAmount = 0f
attr.windowAnimations = 0
attributes = attr
setBackgroundDrawableResource(R.drawable.bg_eink_border_dialog)
}
}
//if (AppConfig.isEInkMode) {
//dialog.window?.run {
//val attr = attributes
//attr.dimAmount = 0f
//attr.windowAnimations = 0
//attributes = attr
//setBackgroundDrawableResource(R.drawable.bg_eink_border_dialog)
// }
//}
return dialog
}
override fun show(): AlertDialog {
val dialog = builder.show()
if (AppConfig.isEInkMode) {
dialog.window?.run {
val attr = attributes
attr.dimAmount = 0f
attr.windowAnimations = 0
attributes = attr
setBackgroundDrawableResource(R.drawable.bg_eink_border_dialog)
}
}
//if (AppConfig.isEInkMode) {
//dialog.window?.run {
//val attr = attributes
//attr.dimAmount = 0f
//attr.windowAnimations = 0
//attributes = attr
//setBackgroundDrawableResource(R.drawable.bg_eink_border_dialog)
// }
//}
return dialog
}
}