mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
awful.menu: fix icon widget if no image given
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2893d91bbf
commit
950e9f96c5
1 changed files with 5 additions and 1 deletions
|
@ -109,13 +109,17 @@ local function add_item(data, num, item_info)
|
|||
}
|
||||
|
||||
-- Create the item icon widget
|
||||
local icon = widget({ type = "imagebox", align = "left" })
|
||||
local icon
|
||||
if item_info[3] then
|
||||
icon = widget({ type = "imagebox", align = "left" })
|
||||
if type(item_info[3]) == "string" then
|
||||
icon.image = image(item_info[3])
|
||||
else
|
||||
icon.image = item_info[3]
|
||||
end
|
||||
else
|
||||
icon = widget({type = "textbox", align = "left" })
|
||||
icon.width = data.h
|
||||
end
|
||||
|
||||
icon:buttons(bindings)
|
||||
|
|
Loading…
Reference in a new issue