widgets/krunner: add ability to close the widget with a tap on an empty area

This commit is contained in:
Yari Polla 2022-07-13 20:04:15 +02:00 committed by Devin Lin
parent 204482f47b
commit b8bdcdd825

View file

@ -177,7 +177,6 @@ Item {
NumberAnimation { duration: PlasmaCore.Units.shortDuration } NumberAnimation { duration: PlasmaCore.Units.shortDuration }
} }
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Milou.ResultsListView { Milou.ResultsListView {
@ -207,8 +206,8 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent") color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent")
Behavior on color { Behavior on color {
ColorAnimation { duration: PlasmaCore.Units.shortDuration } ColorAnimation { duration: PlasmaCore.Units.shortDuration }
} }
} }
@ -283,6 +282,13 @@ Item {
} }
} }
} }
MouseArea {
Layout.fillWidth: true
Layout.fillHeight: true
onClicked: close()
}
} }
} }
} }