E-book viewer: Fix scrolling with two fingers on touchpad on macOS not smooth. Fixes #1911218 [Scrolling with built-in trackpad of MacBook Pro on macOS very unsmooth](https://bugs.launchpad.net/calibre/+bug/1911218)

On macOS swiping fast tends to scroll along both axes simultaneously
This commit is contained in:
Kovid Goyal 2021-01-21 08:21:55 +05:30
parent 46cf7998ab
commit 309cecad1c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -148,9 +148,9 @@ def flow_onwheel(evt):
# Right goes forward, so the sign is correct.
else:
db = dx
if di:
if Math.abs(di) >= 1:
scroll_viewport.scroll_by_in_inline_direction(di)
elif Math.abs(db) >= 1:
if Math.abs(db) >= 1:
scroll_by_and_check_next_page(db)
@check_for_scroll_end