diff options
Diffstat (limited to 'src/gui/widgets/extendedlistbox.cpp')
-rw-r--r-- | src/gui/widgets/extendedlistbox.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp index b932f91b0..8c850775a 100644 --- a/src/gui/widgets/extendedlistbox.cpp +++ b/src/gui/widgets/extendedlistbox.cpp @@ -37,12 +37,21 @@ #include "debug.h" ExtendedListBox::ExtendedListBox(const Widget2 *const widget, - gcn::ListModel *const listModel) : + gcn::ListModel *const listModel, + int rowHeight) : ListBox(widget, listModel), - mRowHeight(13), + mRowHeight(rowHeight), mImagePadding(mSkin ? mSkin->getOption("imagePadding") : 0), mSpacing(mSkin ? mSkin->getOption("spacing") : 0) { + if (!mRowHeight) + { + const gcn::Font *font = getFont(); + if (font) + mRowHeight = font->getHeight() + 2 * mPadding; + else + mRowHeight = 13; + } } ExtendedListBox::~ExtendedListBox() |