implement popupPosition

call it only by setting a visualParent, don't expose it to qml for now
wilder-5.14
Marco Martin 13 years ago
parent 77d91a4304
commit 5b15bb4d12
  1. 18
      qmlpackages/desktop/contents/ui/CompactApplet.qml

@ -44,12 +44,7 @@ Item {
//windowFlags: Qt.Popup //windowFlags: Qt.Popup
color: Qt.rgba(0,0,0,0) color: Qt.rgba(0,0,0,0)
visible: plasmoid.expanded visible: plasmoid.expanded
onVisibleChanged: { visualParent: root
if (!visible) {
plasmoid.expanded = false
}
}
mainItem: Rectangle { mainItem: Rectangle {
id: appletParent id: appletParent
radius: 5 radius: 5
@ -58,5 +53,16 @@ Item {
onWidthChanged: applet.width = width onWidthChanged: applet.width = width
onHeightChanged: applet.height = height onHeightChanged: applet.height = height
} }
onActiveWindowChanged: {
if (!activeWindow) {
plasmoid.expanded = false
}
}
onVisibleChanged: {
if (!visible) {
plasmoid.expanded = false
}
}
} }
} }

Loading…
Cancel
Save