diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-27 14:42:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:15:05 +0300 |
commit | 60add2c149c9c61bfbede5ae92cfe216927aca8a (patch) | |
tree | 9ded097faa108eb07b9ca1c8ce4490882e238a44 /src/gui/widgets/dropdown.cpp | |
parent | 2babe1d6491f5231b0e97349ccb198b92bb90ba9 (diff) | |
download | manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.gz manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.bz2 manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.xz manaverse-60add2c149c9c61bfbede5ae92cfe216927aca8a.zip |
Improve a bit draw speed in other controls.
Diffstat (limited to 'src/gui/widgets/dropdown.cpp')
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 8c8f6843f..ec564146e 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -227,9 +227,10 @@ void DropDown::draw(gcn::Graphics* graphics) if (mPopup->getListModel() && mPopup->getSelected() >= 0) { - graphics->setFont(getFont()); + gcn::Font *const font = getFont(); + graphics->setFont(font); graphics->setColor(mForegroundColor); - graphics->drawText(mPopup->getListModel()->getElementAt( + font->drawString(graphics, mPopup->getListModel()->getElementAt( mPopup->getSelected()), mPadding, mPadding); } |