Commit 9ce466f6 authored by Arjen Hiemstra's avatar Arjen Hiemstra Committed by Nate Graham
Browse files

Base scroll speed on text height rather than image row height

Apply the same change[^1] as we did a while ago for KDirOperator and
Dolphin to effectively reduce the scroll speed when using large
thumbnails, otherwise scroll with a mouse wheel ends up being useless.

[1]:
frameworks/kio@59b94447

BUG: 297853
parent 9ca326bb
......@@ -333,6 +333,12 @@ ThumbnailView::ThumbnailView(QWidget* parent)
connect(d->mTouch, &Touch::pinchGestureStarted, this, &ThumbnailView::setZoomParameter);
connect(d->mTouch, &Touch::tapTriggered, this, &ThumbnailView::tapGesture);
connect(d->mTouch, &Touch::tapHoldAndMovingTriggered, this, &ThumbnailView::startDragFromTouch);
const QFontMetrics metrics(viewport()->font());
const int singleStep = metrics.height() * QApplication::wheelScrollLines();
verticalScrollBar()->setSingleStep(singleStep);
horizontalScrollBar()->setSingleStep(singleStep);
}
ThumbnailView::~ThumbnailView()
......
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