mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
use two finger swipe west/east to close TOC and bookmark respectively
This commit is contained in:
@@ -101,8 +101,18 @@ function ReaderBookmark:onShowBookmark()
|
||||
item_table = self.bookmarks,
|
||||
width = Screen:getWidth(),
|
||||
height = Screen:getHeight(),
|
||||
show_parent = menu_container,
|
||||
is_borderless = true,
|
||||
on_close_ges = {
|
||||
GestureRange:new{
|
||||
ges = "two_finger_swipe",
|
||||
range = Geom:new{
|
||||
x = 0, y = 0,
|
||||
w = Screen:getWidth(),
|
||||
h = Screen:getHeight(),
|
||||
},
|
||||
direction = "east"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local menu_container = CenterContainer:new{
|
||||
@@ -130,6 +140,8 @@ function ReaderBookmark:onShowBookmark()
|
||||
UIManager:close(menu_container)
|
||||
end
|
||||
|
||||
bm_menu.show_parent = menu_container
|
||||
|
||||
UIManager:show(menu_container)
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user