From c35140e8d24802fc3944bfe63790ae5e1730834e Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Fri, 25 Nov 2022 11:18:54 +0200 Subject: [PATCH] ReaderHighlight: new icon in select mode ConfirmBox (#9830) --- frontend/apps/reader/modules/readerhighlight.lua | 1 + frontend/ui/widget/confirmbox.lua | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerhighlight.lua b/frontend/apps/reader/modules/readerhighlight.lua index b7211a029..2214551b6 100644 --- a/frontend/apps/reader/modules/readerhighlight.lua +++ b/frontend/apps/reader/modules/readerhighlight.lua @@ -618,6 +618,7 @@ function ReaderHighlight:onTapSelectModeIcon() if not self.select_mode then return end UIManager:show(ConfirmBox:new{ text = _("You are currently in SELECT mode.\nTo finish highlighting, long press where the highlight should end and press the HIGHLIGHT button.\nYou can also exit select mode by tapping on the start of the highlight."), + icon = "format-quote-close", ok_text = _("Exit select mode"), cancel_text = _("Close"), ok_callback = function() diff --git a/frontend/ui/widget/confirmbox.lua b/frontend/ui/widget/confirmbox.lua index 8618584c2..378efb4b4 100644 --- a/frontend/ui/widget/confirmbox.lua +++ b/frontend/ui/widget/confirmbox.lua @@ -44,6 +44,7 @@ local ConfirmBox = InputContainer:extend{ keep_dialog_open = false, text = _("no text"), face = Font:getFace("infofont"), + icon = "notice-question", ok_text = _("OK"), cancel_text = _("Cancel"), ok_callback = function() end, @@ -83,7 +84,8 @@ function ConfirmBox:init() local content = HorizontalGroup:new{ align = "center", IconWidget:new{ - icon = "notice-question", + icon = self.icon, + alpha = true, }, HorizontalSpan:new{ width = Size.span.horizontal_default }, text_widget,