mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Use better close-on-Enter logic
This commit is contained in:
parent
6a327e0db3
commit
0841abead3
1 changed files with 4 additions and 8 deletions
|
@ -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 {
|
||||||
|
|
||||||
focus: true
|
focus: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onAccepted: {
|
||||||
|
if (input.text.match("#.+?:.{3,}"))
|
||||||
|
dbb.accepted();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue