Bug 488092 - "Click in track to scroll by one page at a time" feature doesn't work anymore
Summary: "Click in track to scroll by one page at a time" feature doesn't work anymore
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.3.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: regression
: 491250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-05 23:29 UTC by Jure Repinc
Modified: 2024-08-05 18:08 UTC (History)
10 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jure Repinc 2024-06-05 23:29:01 UTC
SUMMARY
I have selected the setting "Clicking in scrollbar track:" → "Scrolls one page up or down"

STEPS TO REPRODUCE
1. Set the setting to only scroll by one page as mentioned above
2. Click below the scrollbar handle

OBSERVED RESULT
Discover moves the view directly to the clicked location (as if "Scrolls to the clicked location" setting was set).

EXPECTED RESULT
Dicover should scroll only one page as the settings says.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240531
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.3-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 Filip 2024-06-06 06:29:09 UTC
I can confirm this bug. It's reproducible on Discover.
For example Dolphin and Okular work as expected.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6600K CPU @ 3.50GHz
Memory: 7.7 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970/PCIe/SSE2
Comment 2 Nate Graham 2024-06-10 19:18:05 UTC
Can reproduce. Seems to affect all QtQuick scrollviews, which means it's a regression in our scrollbar handling code.
Comment 3 ratijas 2024-06-25 20:26:20 UTC
This isn't particularly surprising, apparently we knew it long before Plasma 6.0 release: https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/214#note_608786

By the way, according to the BUG 384889 this feature never ever worked in PlasmaComponents.

It seems like we need a better upstream API, not a super-duper custom bikeshedded behavior override downstream.
Comment 4 ratijas 2024-07-15 16:47:10 UTC
Another brief investigation shows that the event handling never reaches our MouseArea background only because its default z-index is assigned to -1 by the QQuickControl::setBackground method which is stacked below the parent ScrollBar itself. If you set z-index for the background to some positive value, it will work as before.
Comment 5 Bug Janitor Service 2024-07-15 16:52:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/421
Comment 6 ratijas 2024-07-15 18:18:05 UTC
Meanwhile, I also filed an upstream feature request for more QQC2.ScrollBar API: https://bugreports.qt.io/browse/QTBUG-127172
Comment 7 ratijas 2024-07-23 15:33:23 UTC
Git commit 40b55f9a0fef21a02671efe7f87b95b3702dec13 by ivan tkachenko.
Committed on 23/07/2024 at 10:47.
Pushed by ngraham into branch 'master'.

ScrollBar: Fix custom scrolling behavior

In order to add our custom mouse event handling behavior to the
QQuickScrollBar, the only way in Qt 6 is to put the MouseArea in front
of it, i.e. with a higher stacking z index, and only handle a subset of
events which we are going to fully process ourselves, while rejecting
the rest to let them propagate further down to the scroll bar itself.

M  +16   -4    org.kde.desktop/ScrollBar.qml

https://invent.kde.org/frameworks/qqc2-desktop-style/-/commit/40b55f9a0fef21a02671efe7f87b95b3702dec13
Comment 8 Nate Graham 2024-08-05 18:08:21 UTC
*** Bug 491250 has been marked as a duplicate of this bug. ***