[SpinBox] Improve mouse wheel behavior
ClosedPublic

Authored by broulik on Apr 1 2019, 8:43 AM.

Details

Summary

Emit valueChanged signal since this is an explicit user interaction.
Also, enforce "steps" for high precision touchpad scrolling.

Test Plan
  • Scrolling with touchpad no longer makes it go crazy
  • Scrolling with mousewheel still works as expected
  • Changing value with wheel has the same effect now as clicking the arrow buttons

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Apr 1 2019, 8:43 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 1 2019, 8:43 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Apr 1 2019, 8:43 AM
broulik edited the test plan for this revision. (Show Details)
davidedmundson added inline comments.
org.kde.desktop/SpinBox.qml
74

Does this match the widget? It seems sensible if you you had two physical wheels, if it was exposed as a scroll-ball, this behaviour seems a bit weird.

abetts added a subscriber: abetts.Apr 1 2019, 1:56 PM

Can you add a before/after video maybe? Just to see the changes

broulik updated this revision to Diff 55216.Apr 1 2019, 5:21 PM
  • Only use y delta, which is what QAbstractSpinBox does
davidedmundson accepted this revision.Apr 1 2019, 8:59 PM
This revision is now accepted and ready to land.Apr 1 2019, 8:59 PM
This revision was automatically updated to reflect the committed changes.