From b8bdcdd825fcc9de9708800c78369e18b5db03ce Mon Sep 17 00:00:00 2001 From: Yari Polla Date: Wed, 13 Jul 2022 20:04:15 +0200 Subject: [PATCH] widgets/krunner: add ability to close the widget with a tap on an empty area --- .../qml/widgets/krunner/KRunnerWidget.qml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml b/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml index f51303959..43f925c3e 100644 --- a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml +++ b/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml @@ -177,7 +177,6 @@ Item { NumberAnimation { duration: PlasmaCore.Units.shortDuration } } - Layout.fillHeight: true Layout.fillWidth: true Milou.ResultsListView { @@ -207,8 +206,8 @@ Item { Rectangle { anchors.fill: parent color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent") - Behavior on color { - ColorAnimation { duration: PlasmaCore.Units.shortDuration } + Behavior on color { + ColorAnimation { duration: PlasmaCore.Units.shortDuration } } } @@ -283,6 +282,13 @@ Item { } } } + + MouseArea { + Layout.fillWidth: true + Layout.fillHeight: true + + onClicked: close() + } } } } -- GitLab