mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
awful.menu: align text when item doesn't have icon
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f58c878b96
commit
4a6885e0eb
1 changed files with 8 additions and 4 deletions
|
@ -116,11 +116,15 @@ local function add_item(data, num, item_info)
|
|||
if item_info[3] then
|
||||
icon = widget({ type = "imagebox", name = "icon", align = "left" })
|
||||
icon.image = image(item_info[3])
|
||||
else
|
||||
icon = widget({ type = "textbox", name = "icon", align = "left" })
|
||||
icon.width = theme.menu_height
|
||||
end
|
||||
|
||||
icon:buttons(bindings)
|
||||
|
||||
function icon.mouse_enter() mouse_enter(item) end
|
||||
function icon.mouse_leave() mouse_leave(item) end
|
||||
end
|
||||
|
||||
-- Create the item label widget
|
||||
local label = widget({
|
||||
|
|
Loading…
Reference in a new issue