mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 02:34:45 +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
|
z: 1
|
||||||
contentItem: QuickSettings {
|
contentItem: QuickSettings {
|
||||||
id: quickSettings
|
id: quickSettings
|
||||||
|
onCloseRequested: {
|
||||||
|
slidingPanel.hide()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ ColumnLayout {
|
||||||
id: delegateRoot
|
id: delegateRoot
|
||||||
property bool toggled: model.enabled
|
property bool toggled: model.enabled
|
||||||
spacing: units.smallSpacing
|
spacing: units.smallSpacing
|
||||||
|
signal closeRequested
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2
|
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2
|
||||||
|
|
@ -93,6 +94,7 @@ ColumnLayout {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (model.settingsCommand) {
|
if (model.settingsCommand) {
|
||||||
plasmoid.nativeInterface.executeCommand(model.settingsCommand);
|
plasmoid.nativeInterface.executeCommand(model.settingsCommand);
|
||||||
|
closeRequested();
|
||||||
} else if (model.toggleFunction) {
|
} else if (model.toggleFunction) {
|
||||||
root[model.toggleFunction]();
|
root[model.toggleFunction]();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ Item {
|
||||||
implicitWidth: flow.implicitWidth + units.smallSpacing * 6
|
implicitWidth: flow.implicitWidth + units.smallSpacing * 6
|
||||||
implicitHeight: flow.implicitHeight + units.smallSpacing * 6
|
implicitHeight: flow.implicitHeight + units.smallSpacing * 6
|
||||||
|
|
||||||
|
signal closeRequested
|
||||||
|
|
||||||
function toggleAirplane() {
|
function toggleAirplane() {
|
||||||
print("toggle airplane mode")
|
print("toggle airplane mode")
|
||||||
}
|
}
|
||||||
|
|
@ -195,6 +197,10 @@ Item {
|
||||||
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 {
|
||||||
|
target: item
|
||||||
|
onCloseRequested: root.closeRequested()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
move: Transition {
|
move: Transition {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue