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:
chrox
2013-12-27 21:47:08 +08:00
parent e5de29bfbd
commit 32cd7b2a88
4 changed files with 4 additions and 13 deletions

View File

@@ -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"))

View File

@@ -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

View File

@@ -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

View File

@@ -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