mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ebook-viewer: handle vertical and horizontal scrolling.
This commit is contained in:
parent
8a1c2a31db
commit
def5885cf2
@ -509,8 +509,13 @@ class DocumentView(QWebView):
|
||||
self.manager.previous_document()
|
||||
event.accept()
|
||||
return
|
||||
|
||||
ret = QWebView.wheelEvent(self, event)
|
||||
self.scroll_by(0, event.delta() * -1)
|
||||
if event.orientation() == Qt.Vertical:
|
||||
self.scroll_by(0, event.delta() * -1)
|
||||
else:
|
||||
self.scroll_by(event.delta() * -1, 0)
|
||||
|
||||
if self.manager is not None:
|
||||
self.manager.scrolled(self.scroll_fraction)
|
||||
return ret
|
||||
|
Loading…
x
Reference in New Issue
Block a user