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)

This commit is contained in:
Kovid Goyal 2016-12-19 16:44:52 +05:30
parent 9d57c35957
commit 74cfabf647

View File

@ -295,7 +295,7 @@ class GestureHandler(QObject):
view = self.parent() view = self.parent()
if not view.document.in_paged_mode: if not view.document.in_paged_mode:
return 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)() getattr(view, func)()
def handle_swiping(self, x, y): def handle_swiping(self, x, y):
@ -371,6 +371,7 @@ class GestureHandler(QObject):
def show_help(self): def show_help(self):
Help(self.parent()).exec_() Help(self.parent()).exec_()
if __name__ == '__main__': if __name__ == '__main__':
app = QApplication([]) app = QApplication([])
Help().exec_() Help().exec_()