[feat] GestureManager: Implement action to change highlight style using gesture manager (#4936)

This commit is contained in:
Galunid
2019-04-18 06:12:38 -04:00
committed by Frans de Jonge
parent c053e48526
commit 9759ffa381
2 changed files with 20 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ local action_strings = {
show_plus_menu = _("Show plus menu"),
folder_shortcuts = _("Folder shortcuts"),
cycle_highlight_action = _("Cycle highlight action"),
cycle_highlight_style = _("Cycle highlight style"),
wallabag_download = _("Wallabag retrieval"),
}
@@ -488,6 +489,7 @@ function ReaderGesture:buildMenu(ges, default)
{"zoom_content", not self.is_docless},
{"zoom_page", not self.is_docless, true},
{"cycle_highlight_action", not self.is_docless},
{"cycle_highlight_style", not self.is_docless},
{"wallabag_download", self.ui.wallabag ~= nil},
}
local return_menu = {}
@@ -1049,6 +1051,8 @@ function ReaderGesture:gestureAction(action, ges)
self.ui:handleEvent(Event:new("SynchronizeWallabag"))
elseif action == "cycle_highlight_action" then
self.ui:handleEvent(Event:new("CycleHighlightAction"))
elseif action == "cycle_highlight_style" then
self.ui:handleEvent(Event:new("CycleHighlightStyle"))
end
return true
end