update page info layout in menu

this should fix #281
pull/303/head
chrox 11 years ago
parent 2b9b9bc9a5
commit 5cc8fc4c10

@ -32,6 +32,7 @@ function ItemShortCutIcon:init()
end
--@TODO calculate font size by icon size 01.05 2012 (houqp)
local sc_face = nil
if self.key:len() > 1 then
sc_face = Font:getFace("ffont", 14)
else
@ -49,6 +50,7 @@ function ItemShortCutIcon:init()
TextWidget:new{
text = self.key,
face = sc_face,
bgcolor = background/15,
},
},
}
@ -262,6 +264,10 @@ function Menu:_recalculateDimen()
}
self.perpage = math.floor((self.dimen.h - self.dimen.x) / self.item_dimen.h) - 2
self.page_num = math.ceil(#self.item_table / self.perpage)
-- update page info layout, fixed #281
if self.page_info then
self.page_info:resetLayout()
end
end
function Menu:init()

Loading…
Cancel
Save