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.
pull/9/head
chrox 11 years ago
parent cf0795a5dc
commit 039eea17ae

@ -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

@ -85,8 +85,8 @@ function ReaderToc:onShowToc()
title = "Table of Contents",
item_table = self.toc,
ui = self.ui,
width = Screen:getWidth()-20,
height = Screen:getHeight(),
width = Screen:getWidth()-50,
height = Screen:getHeight()-50,
show_parent = menu_container,
}

Loading…
Cancel
Save