Summary: | Plasma Components Slider does not respect step size when using scroll wheel to change value. | ||
---|---|---|---|
Product: | [Frameworks and Libraries] libplasma | Reporter: | Trần Nam Tuấn (Bill) <tuantran1632001> |
Component: | components | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | minor | CC: | me, notmart |
Priority: | NOR | ||
Version: | 5.246.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Test QML file.
Demonstrate video |
Created attachment 164112 [details]
Demonstrate video
Upon looking closer at the code, Plasma Components Slider has wheelEnabled set to true by default. If I set this property to true in QQC Slider, this bug also happens. However, If I set the property to false, scrolling using touchpad still work with QQC Slider but doesn't work with Plasma Components Slider. > However, If I set the property to false, scrolling using touchpad still work with QQC Slider but doesn't work with Plasma Components Slider. Also we do have custom logic in our qqc2-desktop-style Slider.qml: https://invent.kde.org/frameworks/qqc2-desktop-style/-/blob/f159a5d64ecd52dd3e75588759b7ce7838014bc4/org.kde.desktop/Slider.qml#L52-83 which we never ported to Plasma because it's such an ugly hack Well then. For now, I'm just going to round the value to the nearest integer as a workaround. |
Created attachment 164111 [details] Test QML file. The Slider component does not seem to respect step size when using scroll/mouse wheel to change its value. I encounter this on my laptop with a touchpad. The Slider is an item in a PlasmoidItem. Its value is bound to a Label to be displayed. The step size is set to an integer. Snap mode is set to SnapAlways. If I use my mouse click to drag the slider knob, the value is change as expected. If the mouse wheel is used, the value jumps into a non integer value. This behavior does not exist with vanilla QQC.