Skip to content
Snippets Groups Projects
Commit 0841abea authored by Loren Burkholder's avatar Loren Burkholder
Browse files

Use better close-on-Enter logic

parent 6a327e0d
No related branches found
No related tags found
No related merge requests found
Pipeline #1900 passed
...@@ -20,14 +20,6 @@ ApplicationWindow { ...@@ -20,14 +20,6 @@ ApplicationWindow {
width: 350 width: 350
height: fontMetrics.lineSpacing * 7 height: fontMetrics.lineSpacing * 7
Shortcut {
sequence: "Return"
onActivated: {
if (input.text.match("#.+?:.{3,}"))
dbb.accepted();
}
}
Shortcut { Shortcut {
sequence: StandardKey.Cancel sequence: StandardKey.Cancel
onActivated: dbb.rejected() onActivated: dbb.rejected()
...@@ -50,6 +42,10 @@ ApplicationWindow { ...@@ -50,6 +42,10 @@ ApplicationWindow {
focus: true focus: true
Layout.fillWidth: true Layout.fillWidth: true
onAccepted: {
if (input.text.match("#.+?:.{3,}"))
dbb.accepted();
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment