From 60add2c149c9c61bfbede5ae92cfe216927aca8a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Dec 2012 14:42:15 +0300 Subject: Improve a bit draw speed in other controls. --- src/gui/widgets/dropdown.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/dropdown.cpp') 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); } -- cgit v1.2.3-70-g09d2