summaryrefslogtreecommitdiff
path: root/src/gui/widgets/extendedlistbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-28 22:17:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-28 22:17:27 +0300
commit7c51eee345d27e680a26a915ffccb2d0abf063ea (patch)
treef6820434606d9059a1096e32318bb300035ce83b /src/gui/widgets/extendedlistbox.cpp
parent97d8b5320c9c6853e3df0cb08750bf27af694876 (diff)
downloadmv-7c51eee345d27e680a26a915ffccb2d0abf063ea.tar.gz
mv-7c51eee345d27e680a26a915ffccb2d0abf063ea.tar.bz2
mv-7c51eee345d27e680a26a915ffccb2d0abf063ea.tar.xz
mv-7c51eee345d27e680a26a915ffccb2d0abf063ea.zip
Fix previous commit error.
Diffstat (limited to 'src/gui/widgets/extendedlistbox.cpp')
-rw-r--r--src/gui/widgets/extendedlistbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index b1bcf257f..b932f91b0 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -109,12 +109,12 @@ void ExtendedListBox::draw(gcn::Graphics *graphics)
}
else
{
+ const int y = mSelected * height;
g->drawImage(image, mImagePadding, y + (height
- image->getHeight()) / 2 + mPadding);
graphics->setColor(mForegroundSelectedColor);
font->drawString(graphics, mListModel->getElementAt(mSelected),
- image->getWidth() + mImagePadding + mSpacing,
- mSelected * height + textPos);
+ image->getWidth() + mImagePadding + mSpacing, y + textPos);
}
}
BLOCK_END("ExtendedListBox::draw")