Bug 438526

Summary: Page Scrollbar doesn't handle scroll events
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Carl Schwan <carl>
Component: generalAssignee: ratijas <me>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, kde, me, nate, noahadvs, postix
Priority: NOR    
Version: 5.83.0   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
URL: https://invent.kde.org/frameworks/kirigami/-/merge_requests/896
Latest Commit: Version Fixed In: 5.103
Sentry Crash Report:

Description Carl Schwan 2021-06-12 23:39:32 UTC
SUMMARY


STEPS TO REPRODUCE
1. move mouse to scrollbar
2. scroll with the touchpad

OBSERVED RESULT

The ScrollablePage associated with the scrollbar doesn't scroll

EXPECTED RESULT

The ScrollablePage associated with the scrollbar scroll exactly like how it would work anywhere else on the page.

SOFTWARE/OS VERSIONS
openSUSE Tumbleweed
KDE Frameworks Version: master
Qt Version: 5.15.3
Comment 1 Arjen Hiemstra 2021-06-14 08:07:34 UTC
Hmm, Kirigami's ScrollablePage uses a custom implementation of scroll views so I'm not sure if this is the fault of the scrollbar control or the scrollview in Kirigami.
Comment 2 Nate Graham 2022-01-06 17:28:29 UTC
I checked and it's a Kirigami issue. This is handled properly in the base component.
Comment 3 Nate Graham 2022-02-15 21:35:20 UTC
*** Bug 450307 has been marked as a duplicate of this bug. ***
Comment 4 ratijas 2023-01-23 14:55:38 UTC
Git commit dba5d112db45f93f916525cf19d4a05b90bfdab7 by ivan tkachenko.
Committed on 23/01/2023 at 14:33.
Pushed by ratijas into branch 'master'.

WheelHandler: Fix scrolling over ScrollBars on ScrollablePage

Code didn't handle re-parenting of Flickable to a ScrollView, which
occurs in ScrollablePage by design. This prevented scrolling over
scrollbars in such prominent places as list of System Settings modules
or content pane of Discover.

This solution handles re-parenting as well re-assigning either of the
two scrollbars via attached properties. The only precondition is that
ScrollBar attached object should exist before the target is set, so that
we have something to subscribe to.

M  +83   -33   src/wheelhandler.cpp
M  +5    -0    src/wheelhandler.h

https://invent.kde.org/frameworks/kirigami/commit/dba5d112db45f93f916525cf19d4a05b90bfdab7
Comment 5 ratijas 2023-01-23 14:57:32 UTC
Git commit 87f0ed1af4d43d3e23aad68d484a9863690dd832 by ivan tkachenko.
Committed on 23/01/2023 at 14:57.
Pushed by ratijas into branch 'kf5'.

WheelHandler: Fix scrolling over ScrollBars on ScrollablePage

Code didn't handle re-parenting of Flickable to a ScrollView, which
occurs in ScrollablePage by design. This prevented scrolling over
scrollbars in such prominent places as list of System Settings modules
or content pane of Discover.

This solution handles re-parenting as well re-assigning either of the
two scrollbars via attached properties. The only precondition is that
ScrollBar attached object should exist before the target is set, so that
we have something to subscribe to.
(cherry picked from commit dba5d112db45f93f916525cf19d4a05b90bfdab7)

M  +83   -33   src/wheelhandler.cpp
M  +5    -0    src/wheelhandler.h

https://invent.kde.org/frameworks/kirigami/commit/87f0ed1af4d43d3e23aad68d484a9863690dd832