Add external function for {tag,task,tab}list background image
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7a47355c99
commit
1c76560da7
|
@ -48,6 +48,7 @@ function common.list_update(w, buttons, label, data, objects)
|
||||||
ib = cache.ib
|
ib = cache.ib
|
||||||
tb = cache.tb
|
tb = cache.tb
|
||||||
bgb = cache.bgb
|
bgb = cache.bgb
|
||||||
|
m = cache.m
|
||||||
else
|
else
|
||||||
ib = wibox.widget.imagebox()
|
ib = wibox.widget.imagebox()
|
||||||
tb = wibox.widget.textbox()
|
tb = wibox.widget.textbox()
|
||||||
|
@ -68,7 +69,8 @@ function common.list_update(w, buttons, label, data, objects)
|
||||||
data[o] = {
|
data[o] = {
|
||||||
ib = ib,
|
ib = ib,
|
||||||
tb = tb,
|
tb = tb,
|
||||||
bgb = bgb
|
bgb = bgb,
|
||||||
|
m = m
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -78,6 +80,9 @@ function common.list_update(w, buttons, label, data, objects)
|
||||||
tb:set_markup("<i><Invalid text></i>")
|
tb:set_markup("<i><Invalid text></i>")
|
||||||
end
|
end
|
||||||
bgb:set_bg(bg)
|
bgb:set_bg(bg)
|
||||||
|
if type(bg_image) == "function" then
|
||||||
|
bg_image = bg_image(tb,o,m,objects,i)
|
||||||
|
end
|
||||||
bgb:set_bgimage(bg_image)
|
bgb:set_bgimage(bg_image)
|
||||||
ib:set_image(icon)
|
ib:set_image(icon)
|
||||||
w:add(bgb)
|
w:add(bgb)
|
||||||
|
|
Loading…
Reference in New Issue