From 74cfabf647e90ca5bb243afcd3dba30924aa1157 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 19 Dec 2016 16:44:52 +0530 Subject: [PATCH] E-book viewer: Make the swipe up gesture move to next section instead of previous section. Fixes #1651034 [Swiping up in Viewer moves forward a section instead of backwards](https://bugs.launchpad.net/calibre/+bug/1651034) --- src/calibre/gui2/viewer/gestures.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/viewer/gestures.py b/src/calibre/gui2/viewer/gestures.py index a2aa9eb66c..b99d870baf 100644 --- a/src/calibre/gui2/viewer/gestures.py +++ b/src/calibre/gui2/viewer/gestures.py @@ -295,7 +295,7 @@ class GestureHandler(QObject): view = self.parent() if not view.document.in_paged_mode: return - func = {Left:'next_page', Right: 'previous_page', Up:'goto_previous_section', Down:'goto_next_section'}[direction] + func = {Left:'next_page', Right: 'previous_page', Down:'goto_previous_section', Up:'goto_next_section'}[direction] getattr(view, func)() def handle_swiping(self, x, y): @@ -371,6 +371,7 @@ class GestureHandler(QObject): def show_help(self): Help(self.parent()).exec_() + if __name__ == '__main__': app = QApplication([]) Help().exec_()