E-book viewer: Fix a regression in 2.0 that changed the speed of scrolling with the mouse wheel in flow mode

This commit is contained in:
Kovid Goyal 2014-08-23 09:22:41 +05:30
parent 0e2f317dcb
commit f349cc358b

View File

@ -1221,7 +1221,7 @@ class DocumentView(QWebView): # {{{
num_degrees_h = event.angleDelta().x() // 8 num_degrees_h = event.angleDelta().x() // 8
vertical = abs(num_degrees) > abs(num_degrees_h) vertical = abs(num_degrees) > abs(num_degrees_h)
scroll_amount = ((num_degrees if vertical else num_degrees_h)/ 120.0) * .2 * -1 scroll_amount = ((num_degrees if vertical else num_degrees_h)/ 120.0) * .2 * -1 * 8
if vertical: if vertical:
self.scroll_by(0, self.document.viewportSize().height() * scroll_amount) self.scroll_by(0, self.document.viewportSize().height() * scroll_amount)
else: else: