fix #1142 by adding 'show page overlap' option for EPUB doc

And 'show page overlap' option is disabled in "page" mode for EPUBs,
and in fit to page/*height zoom mode for PDFs.
This commit is contained in:
chrox
2014-11-13 12:37:10 +08:00
parent 24d629d4e7
commit 307bbe8675
3 changed files with 41 additions and 14 deletions

View File

@@ -136,15 +136,20 @@ function ReaderPaging:onSaveSettings()
end
function ReaderPaging:addToMainMenu(tab_item_table)
if self.ui.document.info.has_pages then
table.insert(tab_item_table.typeset, {
text = _("Show page overlap"),
checked_func = function() return self.show_overlap_enable end,
callback = function()
self.show_overlap_enable = not self.show_overlap_enable
table.insert(tab_item_table.typeset, {
text = _("Show page overlap"),
enabled_func = function()
return not self.view.page_scroll and self.zoom_mode ~= "page"
and not self.zoom_mode:find("height")
end,
checked_func = function() return self.show_overlap_enable end,
callback = function()
self.show_overlap_enable = not self.show_overlap_enable
if not self.show_overlap_enable then
self.view:resetDimArea()
end
})
end
end
})
end
--[[