From 1dec0468bce9a4d1f0d086580692112d74d58582 Mon Sep 17 00:00:00 2001 From: Rosca Alex Date: Mon, 17 Aug 2020 20:36:51 +0200 Subject: [PATCH 1/2] Reduce the maximum time to flick to 200 ms When making a flick using the mouse or the touchscreen and then slowly dragging the pages in the same direction with the flick, it unintentionally reenters the flicking state after a mouse button release and it's quite annoying. The commit reduces the maximum time before the next flick. --- part/pageview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/part/pageview.cpp b/part/pageview.cpp index 91754558b..61da9290d 100644 --- a/part/pageview.cpp +++ b/part/pageview.cpp @@ -429,6 +429,7 @@ PageView::PageView(QWidget *parent, Okular::Document *document) QScrollerProperties prop; prop.setScrollMetric(QScrollerProperties::DecelerationFactor, 0.3); prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 1); + prop.setScrollMetric(QScrollerProperties::AcceleratingFlickMaximumTime, 0.2); prop.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); prop.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); prop.setScrollMetric(QScrollerProperties::DragStartDistance, 0.0); -- GitLab From ca30bc329f1127c57c37dd36a52698aa07f74aa4 Mon Sep 17 00:00:00 2001 From: David Hurka Date: Fri, 6 Nov 2020 17:28:06 +0000 Subject: [PATCH 2/2] Leave note about QTBUG-88249 --- part/pageview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/part/pageview.cpp b/part/pageview.cpp index 61da9290d..0e5a860ac 100644 --- a/part/pageview.cpp +++ b/part/pageview.cpp @@ -429,7 +429,7 @@ PageView::PageView(QWidget *parent, Okular::Document *document) QScrollerProperties prop; prop.setScrollMetric(QScrollerProperties::DecelerationFactor, 0.3); prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 1); - prop.setScrollMetric(QScrollerProperties::AcceleratingFlickMaximumTime, 0.2); + prop.setScrollMetric(QScrollerProperties::AcceleratingFlickMaximumTime, 0.2); // Workaround for QTBUG-88249 (non-flick gestures recognized as accelerating flick) prop.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); prop.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); prop.setScrollMetric(QScrollerProperties::DragStartDistance, 0.0); -- GitLab