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
remotes/origin/release/20.08
Kezi Olio 6 years ago committed by Oliver Sander
parent c54c38f761
commit a5be0149ec
  1. 1
      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);

Loading…
Cancel
Save