diff --git a/include/TimelineItem.h b/include/TimelineItem.h
index ccba27ad..6fd26f52 100644
--- a/include/TimelineItem.h
+++ b/include/TimelineItem.h
@@ -73,6 +73,9 @@ private:
const int AvatarSize = 36;
const float TimestampFontRatio = 0.8;
+ const float EmojiFontRatio = 1.4;
+
+ float EmojiSize = 13;
Avatar *userAvatar_;
diff --git a/src/TimelineItem.cc b/src/TimelineItem.cc
index 12ebcfde..66c55f0c 100644
--- a/src/TimelineItem.cc
+++ b/src/TimelineItem.cc
@@ -44,6 +44,8 @@ void TimelineItem::init()
const int baseWidth = fm.width('A');
MessageMargin = baseWidth * 1.5;
+ EmojiSize = this->font().pointSize() * EmojiFontRatio;
+
topLayout_ = new QHBoxLayout(this);
sideLayout_ = new QVBoxLayout();
mainLayout_ = new QVBoxLayout();
@@ -289,7 +291,9 @@ QString TimelineItem::replaceEmoji(const QString &body)
// TODO: Be more precise here.
if (code > 9000)
- fmtBody += "" + QString(c) + "";
+ fmtBody += QString("").arg(EmojiSize) +
+ QString(c) +
+ "";
else
fmtBody += c;
}