Ebook-viewer: handle vertical and horizontal scrolling.

This commit is contained in:
John Schember 2009-06-11 20:21:15 -04:00
parent 8a1c2a31db
commit def5885cf2

View File

@ -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