Bug 223937 - Scrolling with mouse wheel is too fast in large-icon-sized dialog boxes
Summary: Scrolling with mouse wheel is too fast in large-icon-sized dialog boxes
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Open/save dialogs (show other bugs)
Version: unspecified
Platform: unspecified Linux
: HI normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: junior-jobs, usability
Depends on:
Blocks:
 
Reported: 2010-01-23 16:41 UTC by Unknown
Modified: 2019-12-21 18:57 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.66
Sentry Crash Report:


Attachments
Skeleton patch (1.18 KB, patch)
2019-02-20 18:51 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2010-01-23 16:41:43 UTC
Version:           ismeretlen (using 4.3.90 (KDE 4.3.90 (KDE 4.4 RC1)) "release 212", KDE:KDE4:Factory:Desktop / openSUSE_11.2)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.31.8-0.1-desktop

Open an "Open" dialog box in a KDE application and navigate there where you have a lot of items (for example your picture folder).
Now zoom in as much as you can. Place your cursor inside the file area and start scrolling. 

Scrolling moves ~3-4 columns at once and because I'm navigating (searching) among files it's uncomfortable that I unable to see half of them.
Comment 1 Christoph Feck 2010-01-23 16:59:41 UTC
Related: bug 188757.
Comment 2 Nate Graham 2018-04-13 15:45:21 UTC
Same issue as Dolphin's Icons view; see Bug 386379.

Here's the problem:
1. With a wheel, scroll speed is determined by the number of "lines" to scroll per scroll wheel "tick"
2. Icon size determines the height of each line
3. With huge icons, only a small number of them will be visible at once given the necessarily somewhat small size of the file open/save dialog


Therefore when the icons are huge, scrolling  one "tick" will advance too quickly.

The same fix is required here: use a smaller *effective* line height for the purpose of mouse wheel scrolling when icons are huge.
Comment 3 Nate Graham 2019-02-20 18:51:23 UTC
Created attachment 118226 [details]
Skeleton patch

Something like the attached patch should do it. It doesn't work, and I'm not sure why yet, but it shows the general idea of a fix for this issue.
Comment 4 Colin Griffith 2019-05-01 21:29:00 UTC
(In reply to Nate Graham from comment #3)
> Created attachment 118226 [details]
> Skeleton patch
> 
> Something like the attached patch should do it. It doesn't work, and I'm not
> sure why yet, but it shows the general idea of a fix for this issue.

Second to last line of the patch:

> const int height = itemView->iconSize().height() + metrics.height() * 2.5;

So, you're still including the iconSize().height() in the calculation. Removing that should work, I think.
Comment 5 Nate Graham 2019-12-21 18:57:29 UTC
author	Arjen Hiemstra <ahiemstra@heimr.nl>	2019-12-21 11:55:38 -0700
committer	Nate Graham <nate@kde.org>	2019-12-21 11:56:04 -0700
commit	59b944470470f6bb65fc46cfff8181f7887fd9c8 (patch)
tree	677ebbeb0ca56422733e4908c16dd7991f1effc0
parent	9c131b2944334dd7185c2c8e3537ffe76d3ba7ae (diff)
KDirOperator: Use a fixed line height for scroll speedHEADmaster
Summary:
This patch intends to do mostly the same as D19190, but for KDirOperator.
This uses the font's line height multiplied by the amount of scroll lines
from QApplication as a scroll speed for views. This makes the scroll speed
not depend on the icon size, which greatly improves scrolling behaviour.
For more details, see the linked review.

Test Plan:
Run tests/kfilewidgettest_gui and go to a directory with a lot of items.
Scroll around, then change icon size and see that scrolling speed remains
the same.

Reviewers: ngraham, elvisangelaccio

Reviewed By: ngraham, elvisangelaccio

Subscribers: ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25683