mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
show both reader menu and config menu when tapping top
So the bottom tap zone is optional now and will be removed by default in the future.
This commit is contained in:
@@ -45,6 +45,7 @@ function ReaderConfig:onShowConfigMenu()
|
||||
ui = self.ui,
|
||||
configurable = self.configurable,
|
||||
config_options = self.options,
|
||||
is_always_active = true,
|
||||
close_callback = function() self:onCloseCallback() end,
|
||||
}
|
||||
self.ui:handleEvent(Event:new("DisableHinting"))
|
||||
|
||||
@@ -76,7 +76,7 @@ function ReaderMenu:setUpdateItemTable()
|
||||
})
|
||||
end
|
||||
|
||||
function ReaderMenu:onShowMenu()
|
||||
function ReaderMenu:onShowReaderMenu()
|
||||
if #self.tab_item_table.main == 0 then
|
||||
self:setUpdateItemTable()
|
||||
end
|
||||
@@ -125,7 +125,8 @@ function ReaderMenu:onShowMenu()
|
||||
end
|
||||
|
||||
function ReaderMenu:onTapShowMenu()
|
||||
self:onShowMenu()
|
||||
self.ui:handleEvent(Event:new("ShowConfigMenu"))
|
||||
self.ui:handleEvent(Event:new("ShowReaderMenu"))
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -491,17 +491,8 @@ end
|
||||
|
||||
function ConfigDialog:onShowConfigPanel(index)
|
||||
self.panel_index = index
|
||||
local orig_dimen = self.dialog_frame and self.dialog_frame.dimen or Geom:new{}
|
||||
|
||||
self:update()
|
||||
|
||||
UIManager.repaint_all = true
|
||||
UIManager.full_refresh = true
|
||||
UIManager.update_region_func = function()
|
||||
local update_region = self.dialog_frame.dimen:combine(orig_dimen)
|
||||
DEBUG("update region", update_region)
|
||||
return update_region
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ function TouchMenuItem:onTapSelect(arg, ges)
|
||||
UIManager:setDirty(self.show_parent, "partial")
|
||||
end)
|
||||
self.menu:onMenuSelect(self.item)
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -422,7 +421,6 @@ end
|
||||
function TouchMenu:onTapCloseAllMenus(arg, ges_ev)
|
||||
if ges_ev.pos:notIntersectWith(self.dimen) then
|
||||
self:closeMenu()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user