From 5cc8fc4c10408b3c977faa075ac7261c6a858ded Mon Sep 17 00:00:00 2001 From: chrox Date: Sun, 13 Oct 2013 16:50:23 +0800 Subject: [PATCH] update page info layout in menu this should fix #281 --- frontend/ui/widget/menu.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/ui/widget/menu.lua b/frontend/ui/widget/menu.lua index c0f046cba..dcc200fb6 100644 --- a/frontend/ui/widget/menu.lua +++ b/frontend/ui/widget/menu.lua @@ -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()