mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 18:54:45 +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 alias contentItem: contentArea.contentItem
|
||||||
property int headerHeight
|
property int headerHeight
|
||||||
|
|
||||||
|
signal closed
|
||||||
|
|
||||||
width: Screen.width
|
width: Screen.width
|
||||||
height: Screen.height
|
height: Screen.height
|
||||||
|
|
||||||
|
|
@ -89,6 +91,7 @@ NanoShell.FullScreenOverlay {
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
script: {
|
script: {
|
||||||
window.visible = false;
|
window.visible = false;
|
||||||
|
window.closed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,8 @@ PlasmaCore.ColorScope {
|
||||||
openThreshold: units.gridUnit * 10
|
openThreshold: units.gridUnit * 10
|
||||||
headerHeight: root.height
|
headerHeight: root.height
|
||||||
|
|
||||||
|
onClosed: quickSettings.closed()
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
id: panelContents
|
id: panelContents
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ ColumnLayout {
|
||||||
property bool toggled: model.enabled
|
property bool toggled: model.enabled
|
||||||
spacing: units.smallSpacing
|
spacing: units.smallSpacing
|
||||||
signal closeRequested
|
signal closeRequested
|
||||||
|
signal panelClosed
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2
|
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ Item {
|
||||||
implicitHeight: flow.implicitHeight + units.smallSpacing * 6
|
implicitHeight: flow.implicitHeight + units.smallSpacing * 6
|
||||||
|
|
||||||
signal closeRequested
|
signal closeRequested
|
||||||
|
signal closed
|
||||||
|
|
||||||
function toggleAirplane() {
|
function toggleAirplane() {
|
||||||
print("toggle airplane mode")
|
print("toggle airplane mode")
|
||||||
|
|
@ -193,13 +194,18 @@ Item {
|
||||||
Repeater {
|
Repeater {
|
||||||
model: settingsModel
|
model: settingsModel
|
||||||
delegate: Loader {
|
delegate: Loader {
|
||||||
|
id: loader
|
||||||
//FIXME: why this is needed?
|
//FIXME: why this is needed?
|
||||||
width: flow.columnWidth
|
width: flow.columnWidth
|
||||||
height: item ? item.implicitHeight : 0
|
height: item ? item.implicitHeight : 0
|
||||||
source: Qt.resolvedUrl((model.delegate ? model.delegate : "Delegate") + ".qml")
|
source: Qt.resolvedUrl((model.delegate ? model.delegate : "Delegate") + ".qml")
|
||||||
Connections {
|
Connections {
|
||||||
target: item
|
target: loader.item
|
||||||
onCloseRequested: root.closeRequested()
|
onCloseRequested: root.closeRequested();
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: root
|
||||||
|
onClosed: loader.item.panelClosed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue