mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +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 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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue