Fix the fkey widget
This commit is contained in:
parent
aeb9aeb1b8
commit
9649f04314
|
@ -27,7 +27,7 @@ local function new(data,item)
|
||||||
pref.draw = function(self, context, cr, width, height)
|
pref.draw = function(self, context, cr, width, height)
|
||||||
local padding = height/4
|
local padding = height/4
|
||||||
local key = item._internal.f_key
|
local key = item._internal.f_key
|
||||||
if not keys[height] then
|
if not keys[height] then
|
||||||
pref:emit_signal("widget::updated")
|
pref:emit_signal("widget::updated")
|
||||||
create_pango(height)
|
create_pango(height)
|
||||||
keys[height] = {}
|
keys[height] = {}
|
||||||
|
@ -56,6 +56,12 @@ local function new(data,item)
|
||||||
cr:paint()
|
cr:paint()
|
||||||
end
|
end
|
||||||
pref.fit = function(self,context,width,height)
|
pref.fit = function(self,context,width,height)
|
||||||
|
if not keys[height] then
|
||||||
|
pref:emit_signal("widget::updated")
|
||||||
|
create_pango(height)
|
||||||
|
keys[height] = {}
|
||||||
|
end
|
||||||
|
|
||||||
return max_width,data.item_height
|
return max_width,data.item_height
|
||||||
end
|
end
|
||||||
pref:set_markup("<span fgcolor='".. beautiful.bg_normal .."'><tt><b>F11</b></tt></span>")
|
pref:set_markup("<span fgcolor='".. beautiful.bg_normal .."'><tt><b>F11</b></tt></span>")
|
||||||
|
|
Loading…
Reference in New Issue