taglist: Use oocairo instead of image
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
f4d37f74d3
commit
40aa974ac2
|
@ -7,7 +7,7 @@
|
|||
-- Grab environment we need
|
||||
local capi = { widget = widget,
|
||||
screen = screen,
|
||||
image = image,
|
||||
oocairo = oocairo,
|
||||
client = client }
|
||||
local type = type
|
||||
local setmetatable = setmetatable
|
||||
|
@ -54,7 +54,7 @@ function taglist_label(t, args)
|
|||
local seltags = sel:tags()
|
||||
for _, v in ipairs(seltags) do
|
||||
if v == t then
|
||||
bg_image = capi.image(taglist_squares_sel)
|
||||
bg_image = capi.oocairo.image_surface_create_from_png(taglist_squares_sel)
|
||||
bg_resize = taglist_squares_resize == "true"
|
||||
is_selected = true
|
||||
break
|
||||
|
@ -65,7 +65,7 @@ function taglist_label(t, args)
|
|||
if not is_selected then
|
||||
local cls = t:clients()
|
||||
if #cls > 0 and taglist_squares_unsel then
|
||||
bg_image = capi.image(taglist_squares_unsel)
|
||||
bg_image = capi.oocairo.image_surface_create_from_png(taglist_squares_unsel)
|
||||
bg_resize = taglist_squares_resize == "true"
|
||||
end
|
||||
for k, c in pairs(cls) do
|
||||
|
@ -88,7 +88,7 @@ function taglist_label(t, args)
|
|||
if tag.geticon(t) and type(tag.geticon(t)) == "image" then
|
||||
icon = tag.geticon(t)
|
||||
elseif tag.geticon(t) then
|
||||
icon = capi.image(tag.geticon(t))
|
||||
icon = capi.oocairo.image_surface_create_from_png(tag.geticon(t))
|
||||
end
|
||||
|
||||
return text, bg_color, bg_image, icon
|
||||
|
|
Loading…
Reference in New Issue