diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-28 21:49:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-28 21:49:54 +0300 |
commit | 97d8b5320c9c6853e3df0cb08750bf27af694876 (patch) | |
tree | 86fc2b0a086ad441705fde95895e24dafdc8cf71 /src/gui/widgets/extendedlistbox.cpp | |
parent | 2f24d40b2c75662d284375936f746dc940e212c0 (diff) | |
download | mv-97d8b5320c9c6853e3df0cb08750bf27af694876.tar.gz mv-97d8b5320c9c6853e3df0cb08750bf27af694876.tar.bz2 mv-97d8b5320c9c6853e3df0cb08750bf27af694876.tar.xz mv-97d8b5320c9c6853e3df0cb08750bf27af694876.zip |
Fix selected icon draw in extended listbox.
Diffstat (limited to 'src/gui/widgets/extendedlistbox.cpp')
-rw-r--r-- | src/gui/widgets/extendedlistbox.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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, |