Merge pull request #804 from chrox/touchmenu_fix

bugfix: calculate width of TouchMenu each time when TouchMenu is created
This commit is contained in:
{Qingping,Dave} Hou
2013-03-16 09:50:49 -07:00
3 changed files with 4 additions and 2 deletions

View File

@@ -74,7 +74,8 @@ function ReaderMenu:onShowMenu()
local main_menu = nil
if Device:isTouchDevice() then
main_menu = TouchMenu:new{
name = "wocao",
name = "main_menu",
width = Screen:getWidth(),
tab_item_table = {
self.tab_item_table.navi,
self.tab_item_table.typeset,

View File

@@ -164,7 +164,7 @@ TouchMenu = InputContainer:new{
item_height = scaleByDPI(50),
bordersize = scaleByDPI(2),
padding = scaleByDPI(5),
width = Screen:getWidth(),
width = nil,
height = nil,
page = 1,
max_per_page = 10,

View File

@@ -178,6 +178,7 @@ readerwindow[1][1] = reader
touch_menu = TouchMenu:new{
title = "Document menu",
width = Screen:getWidth(),
tab_item_table = {
{
icon = "resources/icons/appbar.pokeball.png",