From 8a8d9afcb727bdd9da02bd2c525b7685ca9f25b7 Mon Sep 17 00:00:00 2001 From: pescuma Date: Tue, 15 Apr 2008 04:39:03 +0000 Subject: Added support for font service git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@81 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/emoticons/EmoticonsSelectionLayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Plugins/emoticons/EmoticonsSelectionLayout.cpp') 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) -- cgit v1.2.3