add tap zone configuration for the minibar

pull/634/head
chrox 10 years ago
parent 15baeb7867
commit 1fd45c3903

@ -63,6 +63,7 @@ DOVERLAPPIXELS = 30
-- h: height of tap zone in proportion of screen height
DTAP_ZONE_MENU = {x = 1/8, y = 0, w = 3/4, h = 1/4}
DTAP_ZONE_CONFIG = {x = 0, y = 0, w = 0, h = 0}
DTAP_ZONE_MINIBAR = {x = 0, y = 15/16, w = 1, h = 1/16}
DTAP_ZONE_FORWARD = {x = 1/4, y = 0, w = 3/4, h = 1}
DTAP_ZONE_BACKWARD = {x = 0, y = 0, w = 1/4, h = 1}
DTAP_ZONE_BOOKMARK = {x = 7/8, y = 0, w = 1/8, h = 1/8}

@ -67,18 +67,24 @@ function ReaderFooter:init()
self.pageno = self.view.state.page
self.pages = self.view.document.info.number_of_pages
self:updateFooterPage()
local range = Geom:new{
x = Screen:getWidth()*DTAP_ZONE_MINIBAR.x,
y = Screen:getHeight()*DTAP_ZONE_MINIBAR.y,
w = Screen:getWidth()*DTAP_ZONE_MINIBAR.w,
h = Screen:getHeight()*DTAP_ZONE_MINIBAR.h
}
if Device:isTouchDevice() then
self.ges_events = {
TapFooter = {
GestureRange:new{
ges = "tap",
range = self[1]:contentRange(),
range = range,
},
},
HoldFooter = {
GestureRange:new{
ges = "hold",
range = self[1]:contentRange(),
range = range,
},
},
}

Loading…
Cancel
Save