components: handle enter and return

pull/2/head
selsta 5 years ago
parent f03ea0461c
commit 38d412a3fa
Signed by untrusted user: selsta
GPG Key ID: 2EA0A99A8B07AE5E

@ -125,6 +125,8 @@ Item {
source: rect
}
Keys.enabled: inlineButton.visible
Keys.onSpacePressed: doClick()
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: doClick()
}

@ -110,6 +110,8 @@ Item {
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
}
Keys.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: {
root.close()
root.accepted()

@ -254,6 +254,7 @@ Item {
}
Keys.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: {
root.close()
if (passwordDialogMode) {
@ -352,6 +353,8 @@ Item {
}
}
Keys.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: {
if (passwordInput1.text === passwordInput2.text) {
root.close()

@ -146,6 +146,8 @@ Item {
cursorShape: Qt.PointingHandCursor
}
Keys.enabled: button.visible
Keys.onSpacePressed: doClick()
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: doClick()
}