mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +00:00
actiondrawer: Dismiss on click on empty background area
This commit is contained in:
parent
17f582a150
commit
b3884be926
3 changed files with 94 additions and 73 deletions
|
|
@ -54,6 +54,12 @@ PlasmaCore.ColorScope {
|
||||||
interval: 60 * 1000
|
interval: 60 * 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
// dismiss drawer when background is clicked
|
||||||
|
onClicked: root.actionDrawer.close();
|
||||||
|
|
||||||
// left side
|
// left side
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
opacity: applyMinMax(root.actionDrawer.offset / root.maximizedQuickSettingsOffset)
|
opacity: applyMinMax(root.actionDrawer.offset / root.maximizedQuickSettingsOffset)
|
||||||
|
|
@ -108,6 +114,8 @@ PlasmaCore.ColorScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onBackgroundClicked: root.actionDrawer.close();
|
||||||
|
|
||||||
// don't allow notifications widget to get too wide
|
// don't allow notifications widget to get too wide
|
||||||
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25
|
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -136,3 +144,4 @@ PlasmaCore.ColorScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,8 @@ PlasmaCore.ColorScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onBackgroundClicked: root.actionDrawer.close();
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: quickSettings.top
|
top: quickSettings.top
|
||||||
topMargin: quickSettings.height + translate.y
|
topMargin: quickSettings.height + translate.y
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,11 @@ Item {
|
||||||
*/
|
*/
|
||||||
signal unlockRequested()
|
signal unlockRequested()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emitted when the background is clicked (not a notification or other element).
|
||||||
|
*/
|
||||||
|
signal backgroundClicked()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run pending action that was pending for authentication when unlockRequested() was emitted.
|
* Run pending action that was pending for authentication when unlockRequested() was emitted.
|
||||||
*/
|
*/
|
||||||
|
|
@ -119,6 +124,11 @@ Item {
|
||||||
criteria: ViewSection.FullString
|
criteria: ViewSection.FullString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: root.backgroundClicked()
|
||||||
|
}
|
||||||
|
|
||||||
PlasmaExtras.PlaceholderMessage {
|
PlasmaExtras.PlaceholderMessage {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
|
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue