mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 03:18:49 +03:00
Add handy keyboard shortcuts
This commit is contained in:
parent
e9ed12e27b
commit
484845c130
1 changed files with 15 additions and 0 deletions
|
@ -20,6 +20,19 @@ 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 {
|
||||||
|
sequence: StandardKey.Cancel
|
||||||
|
onActivated: dbb.rejected()
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Nheko.paddingMedium
|
spacing: Nheko.paddingMedium
|
||||||
anchors.margins: Nheko.paddingMedium
|
anchors.margins: Nheko.paddingMedium
|
||||||
|
@ -41,6 +54,8 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: DialogButtonBox {
|
footer: DialogButtonBox {
|
||||||
|
id: dbb
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
Nheko.joinRoom(input.text);
|
Nheko.joinRoom(input.text);
|
||||||
joinRoomRoot.close();
|
joinRoomRoot.close();
|
||||||
|
|
Loading…
Reference in a new issue