fix(AppMain): put dropRectangle in a Loader, active when dragging

Fixes #6023
This commit is contained in:
Jonathan Rainville 2022-07-13 10:28:54 -04:00
parent 8433ed9545
commit 4f3a6b46d3
1 changed files with 10 additions and 17 deletions

View File

@ -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