Fix the fkey widget

This commit is contained in:
Emmanuel Lepage Vallee 2016-06-23 00:02:30 -04:00
parent aeb9aeb1b8
commit 9649f04314
1 changed files with 7 additions and 1 deletions

View File

@ -27,7 +27,7 @@ local function new(data,item)
pref.draw = function(self, context, cr, width, height)
local padding = height/4
local key = item._internal.f_key
if not keys[height] then
if not keys[height] then
pref:emit_signal("widget::updated")
create_pango(height)
keys[height] = {}
@ -56,6 +56,12 @@ local function new(data,item)
cr:paint()
end
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
end
pref:set_markup("<span fgcolor='".. beautiful.bg_normal .."'><tt><b>F11</b></tt></span>")