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

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