Bug 459624 - Mouse wheel scrolling on a slider produces inverted results
Summary: Mouse wheel scrolling on a slider produces inverted results
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.105.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-24 21:55 UTC by Patrick Silva
Modified: 2024-01-24 05:04 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.91.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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