awful.menu: align text when item doesn't have icon

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Damien Leone 2008-10-22 16:20:32 +02:00 committed by Julien Danjou
parent f58c878b96
commit 4a6885e0eb

View file

@ -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({