Page overlap menu (cre): set nb of overlap lines (#4538)

Make this existing setting tunable with a menu item.
Also make the Page overlap and Highlight menus use a
checkbox, and their items grayed out when disabled.
This commit is contained in:
poire-z
2019-02-03 11:17:27 +01:00
committed by GitHub
parent 27b6c1546a
commit 895589ddaa
4 changed files with 53 additions and 13 deletions

View File

@@ -841,11 +841,12 @@ local page_overlap_styles = {
dim = _("Gray out"),
}
function ReaderView:genOverlapStyleMenu()
function ReaderView:genOverlapStyleMenu(overlap_enabled_func)
local view = self
local get_overlap_style = function(style)
return {
text = page_overlap_styles[style],
enabled_func = overlap_enabled_func,
checked_func = function()
return view.page_overlap_style == style
end,