Improve scroll wheel speed by basing it on label height, not icon height
Needs ReviewPublic

Authored by ngraham on Feb 20 2019, 5:11 PM.

Details

Reviewers
elvisangelaccio
Group Reviewers
Dolphin
Summary

Dolphin currently scrolls by the height of three items at a time per "step" when
using a scroll wheel. Because item height is highly variable, this leads to scroll
speed being inconsistent between views, and generally far too fast when using
icon view with icons larger than 22px size.

This patch makes the size of the scroll step fixed, using the height of
2.5 text labels + their padding, which is what KDirOperator
does. This feels much better when using a scroll wheel mouse, and better
matches the scroll speed in other KDE apps.

BUG: 386379
FIXED-IN: 19.04.0

Test Plan

Use a mouse with a scroll wheel and scroll in Dolphin item views with list view,
details view, icon view, etc, using different item sizes. Speed should be
consistent in all views now, and also feel consistent with other KDE apps.

Also try with multiple scale factors to make sure the behavior does not change.

No change with high-resolution two-finger touchpad scrolling.

Diff Detail

Repository
R318 Dolphin
Branch
improve-scrollwheel-speed (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8605
Build 8623: arc lint + arc unit
ngraham created this revision.Feb 20 2019, 5:11 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptFeb 20 2019, 5:11 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
ngraham requested review of this revision.Feb 20 2019, 5:11 PM
ngraham updated this revision to Diff 52164.Feb 20 2019, 5:29 PM

Use font metrics

ngraham retitled this revision from [RFC] Improve scroll wheel speed to Improve scroll wheel speed by basing it on label height, not icon height.Feb 20 2019, 5:31 PM
ngraham edited the summary of this revision. (Show Details)
anthonyfieroni added inline comments.
src/kitemviews/kitemlistcontainer.cpp
267–268

I always think that we have that step in library, i have in mind that in system settings has a scroll speed, now i don't see, somethings changed and i did not notice :)

ngraham added inline comments.Feb 20 2019, 5:36 PM
src/kitemviews/kitemlistcontainer.cpp
267–268
ngraham edited the test plan for this revision. (Show Details)Feb 20 2019, 5:37 PM

This patch makes the size of the scroll step fixed, using the height of 2.5 text labels + their padding, which is what KDirOperator does.

Are you sure? It seems to me that the file dialog respects the standard 3-lines/items scroll step, while this patch breaks it.

This patch makes the size of the scroll step fixed, using the height of 2.5 text labels + their padding, which is what KDirOperator does.

Are you sure? It seems to me that the file dialog respects the standard 3-lines/items scroll step, while this patch breaks it.

Ah, but what constitutes an item? The bug is that the icon's height counts for the the purpose of determining the height of one line, which makes the scroll speed variable for views with different icon layouts and height, and very uncomfortable when icons are large. It's really annoying.

Ping! This is one of the most common issues in Dolphin that I hear complained about, and I experience it myself, so I'm quite eager to see it fixed. :)

elvisangelaccio requested changes to this revision.Mar 9 2019, 6:55 PM

Sorry but this patch makes dolphin scroll differently from the file dialog in details view mode, so it cannot go in as-is.

This revision now requires changes to proceed.Mar 9 2019, 6:55 PM
ngraham planned changes to this revision.Mar 10 2019, 4:29 AM

OK. We get the exact complaint for the file dialogs, so I will prepare a patch to do the same thing there too.

https://bugs.kde.org/show_bug.cgi?id=223937

ngraham requested review of this revision.Mar 14 2019, 2:18 AM

(didn't mean to mark as changes planned; I'm still working on the companion KIO patch)