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 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
onIdxChanged: {
if (delegateItem.drag.target != null) {
@ -51,6 +63,10 @@ Item {
target: delegateItem
parent: delegateRoot.parent
}
PropertyChanges {
target: delegateItem
z: 9999
}
}
]
function updateRow() {