base scrolling on the smallest item
ClosedPublic

Authored by mart on Jan 25 2018, 6:08 PM.

Details

Summary

CCBUG: 386379

after recent highdpi patches on scrolling that delegated it
completely to the scrollbar, based upon the scrollbar singleStep
setted to the tallest of the items in the view.
tough this makes scrolling way too fast, and on folders where just
few filenames are longer than most we can get a single scrolling
step almost double the number of lines configured in the
mouse kcm.
Using the shortest item instead of the tallest mitigates this problem
making it a bit more usable

Test Plan

tested on different folders in different view modes both with
mouse and touchpad

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Jan 25 2018, 6:08 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 25 2018, 6:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Jan 25 2018, 6:08 PM
mart edited reviewers, added: broulik; removed: Plasma.Jan 25 2018, 6:09 PM
ngraham edited the summary of this revision. (Show Details)Jan 25 2018, 6:12 PM
ngraham added a subscriber: ngraham.

On my desktop it seems to improve it slightly but on my laptop I don't see any improvement, it's still way too fast. The slightest finger movement scrolls an entire page and more.

mart added a comment.Jan 26 2018, 9:43 AM

do you have in your qt copy this patch?
https://codereview.qt-project.org/#/c/212398/

Same results as Kai, but I also do not have that Qt patch. Still, this is a definite improvement for the wheel mouse use case.

Also FWIW we had trouble with hyper-sensitive touchpad scrolling in Gwenview a few months ago and fixed it with https://cgit.kde.org/gwenview.git/commit/?id=c4a84dad6292b9c7918bec8d7ed33114d3758730

ngraham accepted this revision.Jan 29 2018, 12:34 AM
ngraham edited the summary of this revision. (Show Details)

I understand now. This patch does indeed make it better in the case where you have icons with really long/tall filenames, but it doesn't do anything to help the general case of Dolphin's scrolling being too fast everywhere at a basic level.

I think it can land, but it can't close 386379 since it doesn't completely solve the problem.

This revision is now accepted and ready to land.Jan 29 2018, 12:35 AM
mart added a comment.Jan 29 2018, 10:07 AM

I understand now. This patch does indeed make it better in the case where you have icons with really long/tall filenames, but it doesn't do anything to help the general case of Dolphin's scrolling being too fast everywhere at a basic level.

I think it can land, but it can't close 386379 since it doesn't completely solve the problem.

so, i would push and then try an approach similar to gwenview, tough seems a bit an hack (btw, that patch seems to have a completely different behavior on that cumulative delta reset on zoom in and zoom pout, is it intended?)

This revision was automatically updated to reflect the committed changes.
mart added a comment.Jan 29 2018, 10:54 AM

also, that gwenview patch really looks like a workaround for the Qt bug fixed by https://codereview.qt-project.org/#/c/212398/, since that's upstream now, i'm not sure is worth to workaround in random applications which would just harm in long term maintainability?