diff options
Diffstat (limited to 'Swift/QtUI/QtEmojiCell.cpp')
-rw-r--r-- | Swift/QtUI/QtEmojiCell.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/QtUI/QtEmojiCell.cpp b/Swift/QtUI/QtEmojiCell.cpp index 4932ece..3f2c652 100644 --- a/Swift/QtUI/QtEmojiCell.cpp +++ b/Swift/QtUI/QtEmojiCell.cpp @@ -21,7 +21,9 @@ namespace Swift { font.setBold(true); setFont(font); - setFixedWidth(fontMetrics().width("\xF0\x9F\x98\x83")+5); + const auto boundingRect = fontMetrics().boundingRect("\xF0\x9F\x98\x83"); + setFixedWidth(qMax(boundingRect.width(), boundingRect.height())); + setFixedHeight(qMax(boundingRect.width(), boundingRect.height())); setFlat(true); setToolTip(shortname); |