Polkit diaog shortcut key exit

pull/15/head
reionwong 4 years ago
parent 54812a93a6
commit a1d22ec270

@ -35,7 +35,7 @@ Item {
id: _background id: _background
anchors.fill: parent anchors.fill: parent
color: FishUI.Theme.secondBackgroundColor color: FishUI.Theme.secondBackgroundColor
radius: NotificationDialog.width * 0.05 //FishUI.Theme.bigRadius radius: NotificationDialog.width * 0.02 //FishUI.Theme.bigRadius
opacity: 0.7 opacity: 0.7
border.width: 1 border.width: 1

@ -19,6 +19,11 @@ Item {
rootWindow.minimumWidth = root.width rootWindow.minimumWidth = root.width
} }
Keys.enabled: true
Keys.onEscapePressed: {
confirmation.setConfirmationResult("")
}
Rectangle { Rectangle {
id: _background id: _background
anchors.fill: parent anchors.fill: parent
@ -98,6 +103,10 @@ Item {
if (passwordInput.text) if (passwordInput.text)
confirmation.setConfirmationResult(passwordInput.text) confirmation.setConfirmationResult(passwordInput.text)
} }
Keys.onEscapePressed: {
confirmation.setConfirmationResult("")
}
} }
RowLayout { RowLayout {

Loading…
Cancel
Save