panelClosed signal

This commit is contained in:
Marco Martin 2020-02-04 21:26:26 +01:00
parent 8848017279
commit 9da6edd750
4 changed files with 14 additions and 2 deletions

View file

@ -40,6 +40,8 @@ NanoShell.FullScreenOverlay {
property alias contentItem: contentArea.contentItem
property int headerHeight
signal closed
width: Screen.width
height: Screen.height
@ -89,6 +91,7 @@ NanoShell.FullScreenOverlay {
ScriptAction {
script: {
window.visible = false;
window.closed();
}
}
}

View file

@ -247,6 +247,8 @@ PlasmaCore.ColorScope {
openThreshold: units.gridUnit * 10
headerHeight: root.height
onClosed: quickSettings.closed()
contentItem: Item {
id: panelContents
anchors.fill: parent

View file

@ -27,6 +27,7 @@ ColumnLayout {
property bool toggled: model.enabled
spacing: units.smallSpacing
signal closeRequested
signal panelClosed
Rectangle {
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2

View file

@ -29,6 +29,7 @@ Item {
implicitHeight: flow.implicitHeight + units.smallSpacing * 6
signal closeRequested
signal closed
function toggleAirplane() {
print("toggle airplane mode")
@ -193,13 +194,18 @@ Item {
Repeater {
model: settingsModel
delegate: Loader {
id: loader
//FIXME: why this is needed?
width: flow.columnWidth
height: item ? item.implicitHeight : 0
source: Qt.resolvedUrl((model.delegate ? model.delegate : "Delegate") + ".qml")
Connections {
target: item
onCloseRequested: root.closeRequested()
target: loader.item
onCloseRequested: root.closeRequested();
}
Connections {
target: root
onClosed: loader.item.panelClosed();
}
}
}