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

@@ -100,8 +100,9 @@ function ReaderHighlight:genHighlightDrawerMenu()
end
return {
{
text_func = function()
return self.view.highlight.disabled and _("Enable") or _("Disable")
text = _("Allow highlighting"),
checked_func = function()
return not self.view.highlight.disabled
end,
callback = function()
self.view.highlight.disabled = not self.view.highlight.disabled
@@ -109,6 +110,7 @@ function ReaderHighlight:genHighlightDrawerMenu()
hold_callback = function(touchmenu_instance)
self:makeDefault(not self.view.highlight.disabled)
end,
separator = true,
},
get_highlight_style("lighten"),
get_highlight_style("underscore"),