bugfix: set toc/bookmark window dimension smaller than screen size

Otherwise if text widgets in toc window expands out of screen, memory
free on these widgets will mess up the heap. It sounds ridiculous but
after we restrict toc window well inside the screen the bug in #815
is fixed.
This commit is contained in:
chrox
2013-03-24 18:28:54 +08:00
parent cf0795a5dc
commit 039eea17ae
2 changed files with 4 additions and 4 deletions

View File

@@ -89,8 +89,8 @@ function ReaderBookmark:onShowBookmark()
local bm_menu = Menu:new{
title = "Bookmarks",
item_table = self.bookmarks,
width = Screen:getWidth()-20,
height = Screen:getHeight(),
width = Screen:getWidth()-50,
height = Screen:getHeight()-50,
}
-- buid up menu widget method as closure
local doc = self.ui.document