summaryrefslogtreecommitdiff
path: root/src/gui/emotepopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/emotepopup.cpp')
-rw-r--r--src/gui/emotepopup.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/emotepopup.cpp b/src/gui/emotepopup.cpp
index a286f78e8..39017ac91 100644
--- a/src/gui/emotepopup.cpp
+++ b/src/gui/emotepopup.cpp
@@ -197,12 +197,15 @@ void EmotePopup::recalculateSize()
++mRowCount;
if (mRowCount)
+ {
mColumnCount = emoteCount / mRowCount;
+ if (emoteCount % mRowCount > 0)
+ ++ mColumnCount;
+ }
else
+ {
mColumnCount = 1;
-
- if (emoteCount % mRowCount > 0)
- ++mColumnCount;
+ }
setContentSize(mColumnCount * gridWidth, mRowCount * gridHeight);
}