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
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
// dismiss drawer when background is clicked
|
||||
onClicked: root.actionDrawer.close();
|
||||
|
||||
// left side
|
||||
ColumnLayout {
|
||||
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
|
||||
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 25
|
||||
Layout.fillHeight: true
|
||||
|
|
@ -136,3 +144,4 @@ PlasmaCore.ColorScope {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ PlasmaCore.ColorScope {
|
|||
}
|
||||
}
|
||||
|
||||
onBackgroundClicked: root.actionDrawer.close();
|
||||
|
||||
anchors {
|
||||
top: quickSettings.top
|
||||
topMargin: quickSettings.height + translate.y
|
||||
|
|
|
|||
|
|
@ -68,6 +68,11 @@ Item {
|
|||
*/
|
||||
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.
|
||||
*/
|
||||
|
|
@ -119,6 +124,11 @@ Item {
|
|||
criteria: ViewSection.FullString
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.backgroundClicked()
|
||||
}
|
||||
|
||||
PlasmaExtras.PlaceholderMessage {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
|
||||
|
|
|
|||
Loading…
Reference in a new issue