mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 02:04:45 +00:00
show a placeholder when dragging
This commit is contained in:
parent
08e13e7cc2
commit
06e23491fb
1 changed files with 16 additions and 0 deletions
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue