fix(AppMain): put dropRectangle in a Loader, active when dragging
Fixes #6023
This commit is contained in:
parent
8433ed9545
commit
4f3a6b46d3
|
@ -811,24 +811,17 @@ Item {
|
||||||
rptDraggedPreviews.y = drag.y
|
rptDraggedPreviews.y = drag.y
|
||||||
}
|
}
|
||||||
onExited: cleanup()
|
onExited: cleanup()
|
||||||
Rectangle {
|
Loader {
|
||||||
id: dropRectangle
|
active: dragTarget.enabled && dragTarget.containsDrag
|
||||||
|
width: active ? parent.width : 0
|
||||||
width: parent.width
|
height: active ? parent.height : 0
|
||||||
height: parent.height
|
sourceComponent: Rectangle {
|
||||||
color: Style.current.transparent
|
id: dropRectangle
|
||||||
opacity: 0.8
|
color: Style.current.background
|
||||||
|
opacity: 0.8
|
||||||
states: [
|
}
|
||||||
State {
|
|
||||||
when: dragTarget.enabled && dragTarget.containsDrag
|
|
||||||
PropertyChanges {
|
|
||||||
target: dropRectangle
|
|
||||||
color: Style.current.background
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: rptDraggedPreviews
|
id: rptDraggedPreviews
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue