Merge branch 'release/20.08' into master

remotes/origin/work/aacid/shorcutslost_2008
Nate Graham 5 years ago
commit 12cb9d4e3e
  1. 7
      ui/pageview.cpp

@ -3158,16 +3158,19 @@ void PageView::wheelEvent(QWheelEvent *e)
d->scroller->scrollTo(QPoint(horizontalScrollBar()->value(), verticalScrollBar()->value()), 0); // sync scroller with scrollbar
}
} else {
// When the shift key is held down, scroll ten times faster
int multiplier = e->modifiers() & Qt::ShiftModifier ? 10 : 1;
if (delta != 0 && delta % QWheelEvent::DefaultDeltasPerStep == 0) {
// number of scroll wheel steps Qt gives to us at the same time
int count = abs(delta / QWheelEvent::DefaultDeltasPerStep);
int count = abs(delta / QWheelEvent::DefaultDeltasPerStep) * multiplier;
if (delta < 0) {
slotScrollDown(count);
} else {
slotScrollUp(count);
}
} else {
d->scroller->scrollTo(d->scroller->finalPosition() - e->angleDelta() / 4.0, 0);
d->scroller->scrollTo(d->scroller->finalPosition() - e->angleDelta() * multiplier / 4.0, 0);
}
}
}

Loading…
Cancel
Save