summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Doukoudakis <thanos.doukoudakis@isode.com>2018-04-16 09:59:34 (GMT)
committerKevin Smith <kevin.smith@isode.com>2018-05-10 08:13:57 (GMT)
commit4663da31954d989f8535b94c4a78a0f4515542a4 (patch)
treeaa6cf7a359ed0e61e038f3f518581bc9351d52f9 /Swift/QtUI/QtEmojisSelector.cpp
parent8fab33012e5ac7c03ab00ec30118dcb2c5218051 (diff)
downloadswift-4663da31954d989f8535b94c4a78a0f4515542a4.zip
swift-4663da31954d989f8535b94c4a78a0f4515542a4.tar.bz2
Enable Emojis on Windows and Linux
This patch enables emojis for Linux and Windows. In windows, currently the emojis are only black and white, due to some inconsistencies in the UI. For Linux the Noto Colour Emoji font (https://www.google.com/get/noto/) is used. The client must be build with Qt 5.6 or newer to support the emoji characters. Test-Information: Tested the changes with Qt 5.8 on Windows 10 and Linux Ubuntu 17.10. Built and tested the appimage on Ubuntu 17.10 and Ubuntu 16.04. Change-Id: I6d0f2842349eae789d773c33d1a93ad33304df3e
Diffstat (limited to 'Swift/QtUI/QtEmojisSelector.cpp')
-rw-r--r--Swift/QtUI/QtEmojisSelector.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/Swift/QtUI/QtEmojisSelector.cpp b/Swift/QtUI/QtEmojisSelector.cpp
index 62ed862..fe2f235 100644
--- a/Swift/QtUI/QtEmojisSelector.cpp
+++ b/Swift/QtUI/QtEmojisSelector.cpp
@@ -24,7 +24,6 @@
namespace Swift {
QtEmojisSelector::QtEmojisSelector(QSettings* settings, const std::map<std::string, std::string>& emoticonsMap, QWidget* parent) : QTabWidget(parent), settings_(settings), emoticonsMap_(emoticonsMap) {
-#ifdef SWIFTEN_PLATFORM_MACOSX
recentEmojisGrid_ = addRecentTab();
connect(recentEmojisGrid_, SIGNAL(onEmojiSelected(QString)), this, SLOT(emojiClickedSlot(QString)));
@@ -34,17 +33,13 @@ namespace Swift {
connect(grid, SIGNAL(onEmojiSelected(QString)), this, SLOT(emojiClickedSlot(QString)));
}
}
-
loadSettings();
-#else
- setupEmoticonsTab();
-#endif
+ //The size of an emoji cell varies depending the OS, 42 is the ceil value.
+ setFixedSize(QSize(EmojiMapper::emojisInCategory.size() * 42, 300));
}
QtEmojisSelector::~QtEmojisSelector() {
-#ifdef SWIFTEN_PLATFORM_MACOSX
writeSettings();
-#endif
}
QtRecentEmojisGrid* QtEmojisSelector::addRecentTab() {