use wrapperrectangle
This commit is contained in:
parent
875551777c
commit
6027d0bbff
1 changed files with 5 additions and 14 deletions
|
|
@ -6,7 +6,7 @@ PopupWindow {
|
||||||
id: root
|
id: root
|
||||||
property bool opened: false
|
property bool opened: false
|
||||||
property int animationDuration: 200
|
property int animationDuration: 200
|
||||||
property int margins: 10
|
property alias margins: background.margin
|
||||||
property alias backgroundColor: background.color
|
property alias backgroundColor: background.color
|
||||||
property alias radius: background.radius
|
property alias radius: background.radius
|
||||||
required property Component content
|
required property Component content
|
||||||
|
|
@ -16,12 +16,9 @@ PopupWindow {
|
||||||
implicitWidth: background.width
|
implicitWidth: background.width
|
||||||
implicitHeight: background.height
|
implicitHeight: background.height
|
||||||
|
|
||||||
Rectangle {
|
WrapperRectangle {
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
implicitWidth: margins.width
|
|
||||||
implicitHeight: margins.height
|
|
||||||
|
|
||||||
opacity: 0
|
opacity: 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -61,15 +58,9 @@ PopupWindow {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
WrapperItem {
|
Loader {
|
||||||
id: margins
|
active: root.visible
|
||||||
|
sourceComponent: content
|
||||||
margin: root.margins
|
|
||||||
|
|
||||||
Loader {
|
|
||||||
active: root.visible
|
|
||||||
sourceComponent: content
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue