summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-28 21:49:54 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-28 21:49:54 +0300
commit97d8b5320c9c6853e3df0cb08750bf27af694876 (patch)
tree86fc2b0a086ad441705fde95895e24dafdc8cf71 /src
parent2f24d40b2c75662d284375936f746dc940e212c0 (diff)
downloadmanaverse-97d8b5320c9c6853e3df0cb08750bf27af694876.tar.gz
manaverse-97d8b5320c9c6853e3df0cb08750bf27af694876.tar.bz2
manaverse-97d8b5320c9c6853e3df0cb08750bf27af694876.tar.xz
manaverse-97d8b5320c9c6853e3df0cb08750bf27af694876.zip
Fix selected icon draw in extended listbox.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/extendedlistbox.cpp4
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,