summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-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")