set active area for config menu to 1/12 of screen height

pull/26/head
chrox 11 years ago
parent 993b6a7118
commit df308a895f

@ -45,14 +45,7 @@ function Configurable:saveSettings(settings, prefix)
end end
end end
ReaderConfig = InputContainer:new{ ReaderConfig = InputContainer:new{}
dimen = Geom:new{
x = 0,
y = 7*Screen:getHeight()/8,
w = Screen:getWidth(),
h = Screen:getHeight()/8,
}
}
function ReaderConfig:init() function ReaderConfig:init()
if Device:hasKeyboard() then if Device:hasKeyboard() then
@ -70,7 +63,12 @@ function ReaderConfig:initGesListener()
TapShowConfigMenu = { TapShowConfigMenu = {
GestureRange:new{ GestureRange:new{
ges = "tap", ges = "tap",
range = self.dimen, range = Geom:new{
x = 0,
y = 11*Screen:getHeight()/12,
w = Screen:getWidth(),
h = Screen:getHeight()/12,
}
} }
} }
} }
@ -98,10 +96,9 @@ function ReaderConfig:onTapShowConfigMenu()
end end
function ReaderConfig:onSetDimensions(dimen) function ReaderConfig:onSetDimensions(dimen)
self.dimen.x = 0 if Device:isTouchDevice() then
self.dimen.y = 7 * Screen:getHeight() / 8 self:initGesListener()
self.dimen.w = Screen:getWidth() end
self.dimen.h = Screen:getHeight() / 8
-- since we cannot redraw config_dialog with new size, we close -- since we cannot redraw config_dialog with new size, we close
-- the old one on screen size change -- the old one on screen size change
if self.config_dialog then if self.config_dialog then

@ -54,7 +54,7 @@ function ReaderPaging:initGesListener()
x = Screen:getWidth()/4, x = Screen:getWidth()/4,
y = Screen:getHeight()/4, y = Screen:getHeight()/4,
w = 3*Screen:getWidth()/4, w = 3*Screen:getWidth()/4,
h = 5*Screen:getHeight()/8, h = 2*Screen:getHeight()/3,
} }
} }
}, },
@ -65,7 +65,7 @@ function ReaderPaging:initGesListener()
x = 0, x = 0,
y = Screen:getHeight()/4, y = Screen:getHeight()/4,
w = Screen:getWidth()/4, w = Screen:getWidth()/4,
h = 5*Screen:getHeight()/8, h = 2*Screen:getHeight()/3,
} }
} }
}, },

Loading…
Cancel
Save