From 97d8b5320c9c6853e3df0cb08750bf27af694876 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Dec 2012 21:49:54 +0300 Subject: Fix selected icon draw in extended listbox. --- src/gui/widgets/extendedlistbox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp index 8e27aace8..b1bcf257f 100644 --- a/src/gui/widgets/extendedlistbox.cpp +++ b/src/gui/widgets/extendedlistbox.cpp @@ -63,7 +63,7 @@ void ExtendedListBox::draw(gcn::Graphics *graphics) gcn::Font *const font = getFont(); const int height = getRowHeight(); - int textPos = (height - getFont()->getHeight()) / 2 + mPadding; + int textPos = (height - font->getHeight()) / 2 + mPadding; if (textPos < 0) textPos = 0; @@ -109,6 +109,8 @@ void ExtendedListBox::draw(gcn::Graphics *graphics) } else { + g->drawImage(image, mImagePadding, y + (height + - image->getHeight()) / 2 + mPadding); graphics->setColor(mForegroundSelectedColor); font->drawString(graphics, mListModel->getElementAt(mSelected), image->getWidth() + mImagePadding + mSpacing, -- cgit v1.2.3-70-g09d2