Bug 459624

Summary: Mouse wheel scrolling on a slider produces inverted results
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, kde, nate, noahadvs, notmart
Priority: NOR    
Version: 5.105.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=479028
Latest Commit: Version Fixed In: 5.91.0

Description Patrick Silva 2022-09-24 21:55:48 UTC
STEPS TO REPRODUCE
1. open any off the following KCMs:
General Behavior
Night Color
Display Configuration
User Feedback
2. hover over the slider and scroll up/down (I use a mouse and I do not use inverted scrolling)
3. 

OBSERVED RESULT
the slider moves in inverted direction. When I scroll up, the value decreases. When I scroll down, the value increases.

EXPECTED RESULT
the value increases when we scroll up and decreases when we scroll down

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-10-17 16:06:25 UTC
In progrss with https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/288.
Comment 2 Ismael Asensio 2023-12-06 17:04:42 UTC
Git commit 5d6d74ef68889da7400cb2a16a73527f1927424d by Ismael Asensio.
Committed on 06/12/2023 at 17:46.
Pushed by iasensio into branch 'master'.

Slider: Fix slider scrolling direction

We always want the slider to increase its value when scrolling
up or right, no matter the inverted scrolling setting.

For "regular" scrolling, this corresponds to positive values on
the Y axis and negative values on the X axis. For "natural"
scrolling (indicated by the `inverted` property) is the opposite
so we need to reverse the sign.

Note that the Qt documentation on WheelEvent is dubious:
On https://doc.qt.io/qt-5/qml-qtquick-wheelevent.html, the
`angleDelta` section suggests that positive should be up/right,
but the `inverted` section indicates the above mentioned behavior.
FIXED-IN: 5.91.0

M  +6    -3    org.kde.desktop/Slider.qml

https://invent.kde.org/frameworks/qqc2-desktop-style/-/commit/5d6d74ef68889da7400cb2a16a73527f1927424d