Skip to content

Slider: Fix slider scrolling direction

Ismael Asensio requested to merge work/iasensio/fix-slider-scrolling into master

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.

This requires Qt6.6.1 which includes https://codereview.qt-project.org/c/qt/qtwayland/+/454981.

See also plasma/plasma-pa!171 (merged)

Merge request reports

Loading