mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53:09 +00:00
panelClosed signal
This commit is contained in:
parent
8848017279
commit
9da6edd750
4 changed files with 14 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,6 +247,8 @@ PlasmaCore.ColorScope {
|
|||
openThreshold: units.gridUnit * 10
|
||||
headerHeight: root.height
|
||||
|
||||
onClosed: quickSettings.closed()
|
||||
|
||||
contentItem: Item {
|
||||
id: panelContents
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue