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/textfield.cpp | |
parent | 2babe1d6491f5231b0e97349ccb198b92bb90ba9 (diff) | |
download | plus-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.gz plus-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.bz2 plus-60add2c149c9c61bfbede5ae92cfe216927aca8a.tar.xz plus-60add2c149c9c61bfbede5ae92cfe216927aca8a.zip |
Improve a bit draw speed in other controls.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index fc9c73a68..02ad7699e 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -130,8 +130,9 @@ void TextField::draw(gcn::Graphics *graphics) } graphics->setColor(mForegroundColor); - graphics->setFont(getFont()); - graphics->drawText(mText, mPadding - mXScroll, mPadding); + gcn::Font *const font = getFont(); + graphics->setFont(font); + font->drawString(graphics, mText, mPadding - mXScroll, mPadding); BLOCK_END("TextField::draw") } |