mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
swipe east/west to switch dictionary in dict quick lookup window
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user