summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/colorpage.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index fce2227aa..617084917 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -33,11 +33,14 @@ ColorPage::ColorPage(const Widget2 *const widget,
mItemPadding(mSkin ? mSkin->getOption("itemPadding") : 1),
mRowHeight(13)
{
-// addMouseListener(this);
const gcn::Font *const font = getFont();
if (font)
mRowHeight = font->getHeight() + 2 * mItemPadding;
- adjustSize();
+ if (mListModel)
+ {
+ setHeight(getRowHeight() * mListModel->getNumberOfElements()
+ + 2 * mPadding + 20);
+ }
}
ColorPage::~ColorPage()