Changeset View
Changeset View
Standalone View
Standalone View
org.kde.desktop/SpinBox.qml
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 66 | MouseArea { | |||
---|---|---|---|---|---|
68 | onPressed: mouse.accepted = false; | 68 | onPressed: mouse.accepted = false; | ||
69 | onWheel: { | 69 | onWheel: { | ||
70 | if (wheel.pixelDelta.y < 0 || wheel.angleDelta.y < 0) { | 70 | if (wheel.pixelDelta.y < 0 || wheel.angleDelta.y < 0) { | ||
71 | controlRoot.decrease(); | 71 | controlRoot.decrease(); | ||
72 | } else { | 72 | } else { | ||
73 | controlRoot.increase(); | 73 | controlRoot.increase(); | ||
74 | } | 74 | } | ||
75 | } | 75 | } | ||
76 | // Normally the TextInput does this automatically, but the MouseArea on | ||||
77 | // top of it blocks that behavior, so we need to explicitly do it here | ||||
78 | cursorShape: Qt.IBeamCursor | ||||
76 | } | 79 | } | ||
77 | } | 80 | } | ||
78 | 81 | | |||
79 | up.indicator: Item { | 82 | up.indicator: Item { | ||
80 | implicitWidth: parent.height/2 | 83 | implicitWidth: parent.height/2 | ||
81 | implicitHeight: implicitWidth | 84 | implicitHeight: implicitWidth | ||
82 | x: controlRoot.mirrored ? 0 : parent.width - width | 85 | x: controlRoot.mirrored ? 0 : parent.width - width | ||
83 | } | 86 | } | ||
Show All 26 Lines |