mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
ReaderConfig: bind touch event listener range with widget dimen
So we only need to change widget dimen on SetDimensions event
This commit is contained in:
parent
d4ff6f9291
commit
01e1f72bdd
@ -70,7 +70,7 @@ function ReaderConfig:initGesListener()
|
|||||||
TapShowConfigMenu = {
|
TapShowConfigMenu = {
|
||||||
GestureRange:new{
|
GestureRange:new{
|
||||||
ges = "tap",
|
ges = "tap",
|
||||||
range = self.dimen:copy(),
|
range = self.dimen,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,15 +112,10 @@ function ReaderConfig:onTapShowConfigMenu()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ReaderConfig:onSetDimensions(dimen)
|
function ReaderConfig:onSetDimensions(dimen)
|
||||||
-- update listening according to new screen dimen
|
self.dimen.x = 0
|
||||||
--@TODO do we really need to new a Geom everytime? 02.02 2013 (houqp)
|
self.dimen.y = 7 * Screen:getHeight() / 8
|
||||||
self.dimen = Geom:new{
|
self.dimen.w = Screen:getWidth()
|
||||||
x = 0,
|
self.dimen.h = Screen:getHeight() / 8
|
||||||
y = 7*Screen:getHeight()/8,
|
|
||||||
w = Screen:getWidth(),
|
|
||||||
h = Screen:getHeight()/8,
|
|
||||||
}
|
|
||||||
self:initGesListener()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ReaderConfig:onReadSettings(config)
|
function ReaderConfig:onReadSettings(config)
|
||||||
|
Loading…
Reference in New Issue
Block a user