From a1d22ec270064aaae6fbfe5ad6bc92d66c2617bc Mon Sep 17 00:00:00 2001 From: reionwong Date: Thu, 14 Oct 2021 23:17:28 +0800 Subject: [PATCH] Polkit diaog shortcut key exit --- notificationd/qml/NotificationWindow.qml | 2 +- polkit-agent/main.qml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/notificationd/qml/NotificationWindow.qml b/notificationd/qml/NotificationWindow.qml index 8bbddb7..ec62eba 100644 --- a/notificationd/qml/NotificationWindow.qml +++ b/notificationd/qml/NotificationWindow.qml @@ -35,7 +35,7 @@ Item { id: _background anchors.fill: parent color: FishUI.Theme.secondBackgroundColor - radius: NotificationDialog.width * 0.05 //FishUI.Theme.bigRadius + radius: NotificationDialog.width * 0.02 //FishUI.Theme.bigRadius opacity: 0.7 border.width: 1 diff --git a/polkit-agent/main.qml b/polkit-agent/main.qml index 5a00e1c..906e753 100644 --- a/polkit-agent/main.qml +++ b/polkit-agent/main.qml @@ -19,6 +19,11 @@ Item { rootWindow.minimumWidth = root.width } + Keys.enabled: true + Keys.onEscapePressed: { + confirmation.setConfirmationResult("") + } + Rectangle { id: _background anchors.fill: parent @@ -98,6 +103,10 @@ Item { if (passwordInput.text) confirmation.setConfirmationResult(passwordInput.text) } + + Keys.onEscapePressed: { + confirmation.setConfirmationResult("") + } } RowLayout {