D29534: Implement wheel/touchpad scrolling for SpinBox control
Carson Black
noreply at phabricator.kde.org
Fri May 8 16:21:29 BST 2020
cblack added inline comments.
INLINE COMMENTS
> SpinBox.qml:49
> + if (wheel.angleDelta.y > 0 && control.value <= control.to) {
> + control.value = parseInt(control.value, 10) + control.stepSize
> + valueModified()
`control.value` is already a numeric type as `control` is a SpinBox, so you don't need to `parseInt` here. `control.value =+ control.stepSize`
> SpinBox.qml:50
> + control.value = parseInt(control.value, 10) + control.stepSize
> + valueModified()
> + } else if (wheel.angleDelta.y < 0 && control.value >= control.from) {
I think you would need to explicitly call this on `control`? `control.valueModified()`.
> SpinBox.qml:52
> + } else if (wheel.angleDelta.y < 0 && control.value >= control.from) {
> + control.value = parseInt(control.value, 10) - control.stepSize
> + valueModified()
`control.value =- control.stepSize`
> SpinBox.qml:53
> + control.value = parseInt(control.value, 10) - control.stepSize
> + valueModified()
> + }
`control.valueModified()`.
REPOSITORY
R242 Plasma Framework (Library)
REVISION DETAIL
https://phabricator.kde.org/D29534
To: ngraham, #vdg, #plasma
Cc: cblack, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200508/6822d5ba/attachment.htm>
More information about the Kde-frameworks-devel
mailing list