Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 8b11365c authored by Huon Imberger's avatar Huon Imberger

Fix scrolling with touchpad when in Image view and mouse wheel behaviour set to Browse

Similar to zooming using Ctrl+touchpad two-finger scroll, using touchpad scrolling
in image view when mouse wheel behaviour is set to Browse, browsing images is way
too fast.
This implements the same fix in {D7744} for this case.

BUG: 388353

Test Plan:
  # Settings > Image View > Mouse wheel behaviour = Browse
  # Open folder with a bunch of images, switch to Image view
  # Enable thumbnail bar
  # With mouse over image, scroll with the touchpad

Reviewers: #gwenview, ngraham, rkflx

Reviewed By: #gwenview, ngraham, rkflx

Subscribers: mart

Differential Revision:
parent 0a01215f
......@@ -594,11 +594,14 @@ void DocumentView::wheelEvent(QGraphicsSceneWheelEvent* event)
if (GwenviewConfig::mouseWheelBehavior() == MouseWheelBehavior::Browse
&& event->modifiers() == Qt::NoModifier) {
d->controlWheelAccumulatedDelta += event->delta();
// Browse with mouse wheel
if (event->delta() > 0) {
if (d->controlWheelAccumulatedDelta >= QWheelEvent::DefaultDeltasPerStep) {
} else {
d->controlWheelAccumulatedDelta = 0;
} else if (d->controlWheelAccumulatedDelta <= -QWheelEvent::DefaultDeltasPerStep) {
d->controlWheelAccumulatedDelta = 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment