From b0a10777561aa081af857b46a3e90ee9a22e64d8 Mon Sep 17 00:00:00 2001 From: yparitcher Date: Mon, 7 Dec 2020 14:30:07 -0500 Subject: [PATCH] FileManager: fix Plus menu override (#6957) manage it in FM not in gestures, as #6918 made the menu tap zone the entire width so the tap is not passed through to the gesture plugin --- frontend/apps/filemanager/filemanager.lua | 3 +-- plugins/gestures.koplugin/defaults.lua | 2 +- plugins/gestures.koplugin/main.lua | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/apps/filemanager/filemanager.lua b/frontend/apps/filemanager/filemanager.lua index 1c8d8ad14..268ed0135 100644 --- a/frontend/apps/filemanager/filemanager.lua +++ b/frontend/apps/filemanager/filemanager.lua @@ -121,8 +121,7 @@ function FileManager:init() padding_left = Size.padding.large, padding_right = Size.padding.large, padding_bottom = 0, - callback = nil, -- top right corner callback handled by gesture manager - hold_callback = nil, -- top right corner hold_callback handled by gesture manager + callback = function() self:onShowPlusMenu() end, } self.path_text = TextWidget:new{ diff --git a/plugins/gestures.koplugin/defaults.lua b/plugins/gestures.koplugin/defaults.lua index 9f5f2f842..7f27f34c5 100644 --- a/plugins/gestures.koplugin/defaults.lua +++ b/plugins/gestures.koplugin/defaults.lua @@ -4,7 +4,7 @@ local Device = require("device") return { gesture_fm = { tap_top_left_corner = nil, - tap_top_right_corner = {show_plus_menu = true,}, + tap_top_right_corner = nil, tap_right_bottom_corner = nil, tap_left_bottom_corner = Device:hasFrontlight() and {toggle_frontlight = true,} or nil, hold_top_left_corner = nil, diff --git a/plugins/gestures.koplugin/main.lua b/plugins/gestures.koplugin/main.lua index 45f50cd9c..8cc23ca5b 100644 --- a/plugins/gestures.koplugin/main.lua +++ b/plugins/gestures.koplugin/main.lua @@ -231,7 +231,8 @@ function Gestures:genMenu(ges) end function Gestures:genSubItem(ges, separator, hold_callback) - local reader_only = {tap_top_left_corner=true, hold_top_left_corner=true} + local reader_only = {tap_top_left_corner=true, hold_top_left_corner=true, + tap_top_right_corner=true,} local enabled_func if reader_only[ges] then enabled_func = function() return self.ges_mode == "gesture_reader" end