Skip to content

Commit

Permalink
Restore mouse drag scrolling, so it starts immediately
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kezii authored and osander1 committed Sep 15, 2020
1 parent c54c38f commit a5be014
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/pageview.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit a5be014

Please sign in to comment.