widget.common: Add shape support
This commit is contained in:
parent
f517538b6a
commit
da47357ae7
|
@ -84,7 +84,9 @@ function common.list_update(w, buttons, label, data, objects)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local text, bg, bg_image, icon = label(o, tb)
|
local text, bg, bg_image, icon, args = label(o, tb)
|
||||||
|
args = args or {}
|
||||||
|
|
||||||
-- The text might be invalid, so use pcall.
|
-- The text might be invalid, so use pcall.
|
||||||
if text == nil or text == "" then
|
if text == nil or text == "" then
|
||||||
tbm:set_margins(0)
|
tbm:set_margins(0)
|
||||||
|
@ -104,6 +106,11 @@ function common.list_update(w, buttons, label, data, objects)
|
||||||
else
|
else
|
||||||
ibm:set_margins(0)
|
ibm:set_margins(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
bgb.shape = args.shape
|
||||||
|
bgb.shape_border_width = args.shape_border_width
|
||||||
|
bgb.shape_border_color = args.shape_border_color
|
||||||
|
|
||||||
w:add(bgb)
|
w:add(bgb)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue