From 309cecad1cc089017e536df95a979d47136a6f5a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Jan 2021 08:21:55 +0530 Subject: [PATCH] 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 --- src/pyj/read_book/flow_mode.pyj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyj/read_book/flow_mode.pyj b/src/pyj/read_book/flow_mode.pyj index a898f2888b..b0c26201f5 100644 --- a/src/pyj/read_book/flow_mode.pyj +++ b/src/pyj/read_book/flow_mode.pyj @@ -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