show a placeholder when dragging

This commit is contained in:
Marco Martin 2015-03-13 13:50:13 +01:00
parent 08e13e7cc2
commit 06e23491fb

View file

@ -11,6 +11,18 @@ Item {
property int idx: index property int idx: index
property int oldIdx: -1 property int oldIdx: -1
Rectangle {
anchors.fill: parent
color: PlasmaCore.ColorScope.textColor
radius: units.gridUnit
opacity: (delegateItem.drag.target != null) ? 0.4 : 0
Behavior on opacity {
NumberAnimation {
duration: units.longDuration
easing.type: Easing.InOutQuad
}
}
}
//animate index change //animate index change
onIdxChanged: { onIdxChanged: {
if (delegateItem.drag.target != null) { if (delegateItem.drag.target != null) {
@ -51,6 +63,10 @@ Item {
target: delegateItem target: delegateItem
parent: delegateRoot.parent parent: delegateRoot.parent
} }
PropertyChanges {
target: delegateItem
z: 9999
}
} }
] ]
function updateRow() { function updateRow() {