mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
a close signal
This commit is contained in:
parent
fd88b7add1
commit
b10d1ef5c6
3 changed files with 11 additions and 0 deletions
|
|
@ -259,6 +259,9 @@ PlasmaCore.ColorScope {
|
|||
z: 1
|
||||
contentItem: QuickSettings {
|
||||
id: quickSettings
|
||||
onCloseRequested: {
|
||||
slidingPanel.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ ColumnLayout {
|
|||
id: delegateRoot
|
||||
property bool toggled: model.enabled
|
||||
spacing: units.smallSpacing
|
||||
signal closeRequested
|
||||
|
||||
Rectangle {
|
||||
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2
|
||||
|
|
@ -93,6 +94,7 @@ ColumnLayout {
|
|||
onClicked: {
|
||||
if (model.settingsCommand) {
|
||||
plasmoid.nativeInterface.executeCommand(model.settingsCommand);
|
||||
closeRequested();
|
||||
} else if (model.toggleFunction) {
|
||||
root[model.toggleFunction]();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ Item {
|
|||
implicitWidth: flow.implicitWidth + units.smallSpacing * 6
|
||||
implicitHeight: flow.implicitHeight + units.smallSpacing * 6
|
||||
|
||||
signal closeRequested
|
||||
|
||||
function toggleAirplane() {
|
||||
print("toggle airplane mode")
|
||||
}
|
||||
|
|
@ -195,6 +197,10 @@ Item {
|
|||
width: flow.columnWidth
|
||||
height: item ? item.implicitHeight : 0
|
||||
source: Qt.resolvedUrl((model.delegate ? model.delegate : "Delegate") + ".qml")
|
||||
Connections {
|
||||
target: item
|
||||
onCloseRequested: root.closeRequested()
|
||||
}
|
||||
}
|
||||
}
|
||||
move: Transition {
|
||||
|
|
|
|||
Loading…
Reference in a new issue