From ad45eb28dec84561c447badf485d6a3d783a477d Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 18 Sep 2018 21:48:39 +0200 Subject: [PATCH] Change icon in About window (#4233) --- frontend/ui/elements/common_info_menu_table.lua | 1 + frontend/ui/widget/infomessage.lua | 4 +++- resources/ko-icon.png | Bin 0 -> 1822 bytes 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 resources/ko-icon.png diff --git a/frontend/ui/elements/common_info_menu_table.lua b/frontend/ui/elements/common_info_menu_table.lua index bd170223c..78925555d 100644 --- a/frontend/ui/elements/common_info_menu_table.lua +++ b/frontend/ui/elements/common_info_menu_table.lua @@ -46,6 +46,7 @@ common_info.about = { callback = function() UIManager:show(InfoMessage:new{ text = T(_("KOReader %1\n\nA document viewer for E Ink devices.\n\nLicensed under Affero GPL v3. All dependencies are free software.\n\nhttp://koreader.rocks/"), version), + icon_file = "resources/ko-icon.png" }) end } diff --git a/frontend/ui/widget/infomessage.lua b/frontend/ui/widget/infomessage.lua index b573f863c..49246965d 100644 --- a/frontend/ui/widget/infomessage.lua +++ b/frontend/ui/widget/infomessage.lua @@ -57,6 +57,7 @@ local InfoMessage = InputContainer:new{ image_height = nil, -- The image height if image is used. Keep it nil to use original height. -- Whether the icon should be shown. If it is false, self.image will be ignored. show_icon = true, + icon_file = nil, -- use this file instead of "resources/info-i.png" dismiss_callback = function() end, } @@ -93,8 +94,9 @@ function InfoMessage:init() } else image_widget = ImageWidget:new{ - file = "resources/info-i.png", + file = self.icon_file or "resources/info-i.png", scale_for_dpi = true, + alpha = true, } end else diff --git a/resources/ko-icon.png b/resources/ko-icon.png new file mode 100755 index 0000000000000000000000000000000000000000..f965af31076ed92769befe2ca7f9a9dea784b4f0 GIT binary patch literal 1822 zcmV+(2jTdMP)Px#8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?F zJQ@H1010qNS#tmY1Q!4R1Q!7Ub1dEf00MJROjJcoX>kC*fB>kR0I8e+|Nj7}n*gYs z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