From f02342fe227c6ab05e94d6ac72d05dd0b6f127a2 Mon Sep 17 00:00:00 2001 From: Jedi18 Date: Fri, 5 Feb 2021 21:52:49 +0530 Subject: [PATCH] close emoji autocompleter if space typed after : issue #433 and adds default option for emoji font family settings --- resources/qml/MessageInput.qml | 4 ++++ src/UserSettingsPage.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index 5d335872..5a9cfd33 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -163,6 +163,10 @@ Rectangle { TimelineManager.timeline.input.paste(false); event.accepted = true; } else if (event.key == Qt.Key_Space) { + // close popup if user enters space after colon + if(cursorPosition == completerTriggeredAt + 1) + popup.close(); + if (popup.opened && popup.count <= 0) popup.close(); diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 96c07d7c..5bff1323 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -725,6 +725,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge // TODO: Is there a way to limit to just emojis, rather than // all emoji fonts? auto emojiFamilies = fontDb.families(QFontDatabase::Symbol); + emojiFontSelectionCombo_->addItem(QString("default")); for (const auto &family : emojiFamilies) { emojiFontSelectionCombo_->addItem(family); }