From a5be0149ec627fbc086e5b26cbbe7be13cde49b8 Mon Sep 17 00:00:00 2001 From: Kezi Olio Date: Tue, 15 Sep 2020 14:11:30 +0200 Subject: [PATCH] Restore mouse drag scrolling, so it starts immediately QScroller uses a minimum drag distance before drag scrolling starts by default. This sets the minimum distance to 0.0, to restore the original behavior of the Browse tool. BUG: 420842 --- ui/pageview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/pageview.cpp b/ui/pageview.cpp index e2798bbbb..01fc5513b 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -421,6 +421,7 @@ PageView::PageView(QWidget *parent, Okular::Document *document) prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 1); prop.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); prop.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); + prop.setScrollMetric(QScrollerProperties::DragStartDistance, 0.0); d->scroller->setScrollerProperties(prop); connect(d->scroller, &QScroller::stateChanged, this, &PageView::slotRequestVisiblePixmaps);