summaryrefslogtreecommitdiff
path: root/Plugins/emoticons/EmoticonsSelectionLayout.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2008-04-15 04:39:03 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2008-04-15 04:39:03 +0000
commit8a8d9afcb727bdd9da02bd2c525b7685ca9f25b7 (patch)
treeed50a61a2468dfe64708797c1d50bc3ac2c88ccd /Plugins/emoticons/EmoticonsSelectionLayout.cpp
parent1f4071514a3f75e80c539fcedc4d9603f1cb6b46 (diff)
Added support for font service
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@81 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/emoticons/EmoticonsSelectionLayout.cpp')
-rw-r--r--Plugins/emoticons/EmoticonsSelectionLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Plugins/emoticons/EmoticonsSelectionLayout.cpp b/Plugins/emoticons/EmoticonsSelectionLayout.cpp
index b593bff..ba99e16 100644
--- a/Plugins/emoticons/EmoticonsSelectionLayout.cpp
+++ b/Plugins/emoticons/EmoticonsSelectionLayout.cpp
@@ -131,7 +131,7 @@ int EmoticonsSelectionLayout::GetNumOfCols(int num_emotes)
int cols = num_emotes / MAX_LINES;
if (num_emotes % MAX_LINES != 0)
cols++;
- return min(cols, MAX_COLS);
+ return min(max(MIN_COLS, min(cols, MAX_COLS)), num_emotes);
}
int EmoticonsSelectionLayout::GetNumOfLines(int num_emotes, int cols)