mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 05:13:06 +02: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
1 changed files with 2 additions and 1 deletions
|
|
@ -295,7 +295,7 @@ def handle_swipe(self, direction):
|
|||
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 @@ def handle_pinch(self, direction):
|
|||
def show_help(self):
|
||||
Help(self.parent()).exec_()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = QApplication([])
|
||||
Help().exec_()
|
||||
|
|
|
|||
Loading…
Reference in a new issue