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
|
||||
}
|
||||
onExited: cleanup()
|
||||
Rectangle {
|
||||
Loader {
|
||||
active: dragTarget.enabled && dragTarget.containsDrag
|
||||
width: active ? parent.width : 0
|
||||
height: active ? parent.height : 0
|
||||
sourceComponent: Rectangle {
|
||||
id: dropRectangle
|
||||
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
color: Style.current.transparent
|
||||
opacity: 0.8
|
||||
|
||||
states: [
|
||||
State {
|
||||
when: dragTarget.enabled && dragTarget.containsDrag
|
||||
PropertyChanges {
|
||||
target: dropRectangle
|
||||
color: Style.current.background
|
||||
opacity: 0.8
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: rptDraggedPreviews
|
||||
|
||||
|
|
Loading…
Reference in New Issue