mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Honor the alpha channel in our icon for the About popup (#5208)
It ends up with a black background otherwise. (Old regression that dates back to my alpha shenanigans a few months ago)
This commit is contained in:
@@ -45,7 +45,8 @@ 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"
|
||||
icon_file = "resources/ko-icon.png",
|
||||
alpha = true,
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ local InfoMessage = InputContainer:new{
|
||||
-- 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"
|
||||
alpha = false, -- does that icon have an alpha channel?
|
||||
dismiss_callback = function() end,
|
||||
}
|
||||
|
||||
@@ -91,11 +92,13 @@ function InfoMessage:init()
|
||||
image = self.image,
|
||||
width = self.image_width,
|
||||
height = self.image_height,
|
||||
alpha = self.alpha,
|
||||
}
|
||||
else
|
||||
image_widget = ImageWidget:new{
|
||||
file = self.icon_file or "resources/info-i.png",
|
||||
scale_for_dpi = true,
|
||||
alpha = self.alpha,
|
||||
}
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user