swipe east/west to switch dictionary in dict quick lookup window

This commit is contained in:
chrox
2014-07-24 22:10:28 +08:00
parent 0d1dfcbb6a
commit 82b458102a
2 changed files with 13 additions and 4 deletions

View File

@@ -50,10 +50,10 @@ function ScrollTextWidget:init()
self.dimen = Geom:new(self[1]:getSize())
if Device:isTouchDevice() then
self.ges_events = {
Swipe = {
ScrollText = {
GestureRange:new{
ges = "swipe",
range = self.dimen,
range = function() return self.dimen end,
},
},
}
@@ -70,7 +70,7 @@ function ScrollTextWidget:updateScrollBar(text)
)
end
function ScrollTextWidget:onSwipe(arg, ges)
function ScrollTextWidget:onScrollText(arg, ges)
if ges.direction == "north" then
self.text_widget:scrollDown()
self:updateScrollBar(self.text_widget)
@@ -79,7 +79,6 @@ function ScrollTextWidget:onSwipe(arg, ges)
self:updateScrollBar(self.text_widget)
end
UIManager:setDirty(self.dialog, "partial")
return true
end
return ScrollTextWidget