mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Autoclose completer when space is pressed and no suggestion available
This commit is contained in:
parent
498bfb89b3
commit
d1280af2e4
3 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,7 @@ Popup {
|
|||
property string completerName
|
||||
property var completer
|
||||
property bool bottomToTop: true
|
||||
property alias count: listView.count
|
||||
|
||||
signal completionClicked(string completion)
|
||||
|
||||
|
|
|
@ -162,6 +162,9 @@ Rectangle {
|
|||
if (event.matches(StandardKey.Paste)) {
|
||||
TimelineManager.timeline.input.paste(false);
|
||||
event.accepted = true;
|
||||
} else if (event.key == Qt.Key_Space) {
|
||||
if (popup.opened && popup.count <= 0)
|
||||
popup.close()
|
||||
} else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_U) {
|
||||
messageInput.clear();
|
||||
} else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_P) {
|
||||
|
|
|
@ -35,7 +35,7 @@ Page {
|
|||
colors: palette
|
||||
|
||||
model: EmojiProxyModel {
|
||||
category: EmojiCategory.People
|
||||
category: Emoji.Category.People
|
||||
|
||||
sourceModel: EmojiModel {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue