Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/qml/ButtonGroup.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 38 | KDecoration.Button { | |||
---|---|---|---|---|---|
44 | type: model["button"] | 44 | type: model["button"] | ||
45 | anchors.fill: Drag.active ? undefined : parent | 45 | anchors.fill: Drag.active ? undefined : parent | ||
46 | Drag.keys: [ "decoButtonRemove", view.key ] | 46 | Drag.keys: [ "decoButtonRemove", view.key ] | ||
47 | Drag.active: dragArea.drag.active | 47 | Drag.active: dragArea.drag.active | ||
48 | Drag.onActiveChanged: view.dragging = Drag.active | 48 | Drag.onActiveChanged: view.dragging = Drag.active | ||
49 | } | 49 | } | ||
50 | MouseArea { | 50 | MouseArea { | ||
51 | id: dragArea | 51 | id: dragArea | ||
52 | cursorShape: Qt.PointingHandCursor | 52 | cursorShape: Qt.SizeAllCursor | ||
ngraham: This cursor should only be used when actually dragging (i.e. when the mouse is down), not when… | |||||
vpilo: looks indeed better! | |||||
53 | anchors.fill: parent | 53 | anchors.fill: parent | ||
54 | drag.target: button | 54 | drag.target: button | ||
55 | onReleased: { | 55 | onReleased: { | ||
56 | if (drag.target.Drag.target) { | 56 | if (drag.target.Drag.target) { | ||
57 | drag.target.Drag.drop(); | 57 | drag.target.Drag.drop(); | ||
58 | } else { | 58 | } else { | ||
59 | drag.target.Drag.cancel(); | 59 | drag.target.Drag.cancel(); | ||
60 | } | 60 | } | ||
Show All 15 Lines |
This cursor should only be used when actually dragging (i.e. when the mouse is down), not when a drag is merely possible. For that, a more appropriate cursor might be Qt.SizeAllCursor.