mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
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:
parent
9d57c35957
commit
74cfabf647
@ -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_()
|
||||
|
Loading…
x
Reference in New Issue
Block a user