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 committed 2013-03-16 09:50:49 -07:00
commit a02b828e35
3 files changed
+4 -2

No files matched your search

+2 -1
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,
+1 -1
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,
+1
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",