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
This commit is contained in:
Kezi Olio 2020-09-15 14:11:30 +02:00 committed by Oliver Sander
parent c54c38f761
commit a5be0149ec

View file

@ -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);