summaryrefslogtreecommitdiff
path: root/src/gui/widgets/checkbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 14:42:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:05 +0300
commit60add2c149c9c61bfbede5ae92cfe216927aca8a (patch)
tree9ded097faa108eb07b9ca1c8ce4490882e238a44 /src/gui/widgets/checkbox.cpp
parent2babe1d6491f5231b0e97349ccb198b92bb90ba9 (diff)
downloadManaVerse-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/checkbox.cpp')
-rw-r--r--src/gui/widgets/checkbox.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 786c77fd2..75c3960db 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -94,10 +94,11 @@ void CheckBox::draw(gcn::Graphics* graphics)
BLOCK_START("CheckBox::draw")
drawBox(graphics);
- graphics->setFont(getFont());
+ gcn::Font *const font = getFont();
+ graphics->setFont(font);
graphics->setColor(mForegroundColor);
- graphics->drawText(getCaption(), mPadding + mImageSize + mSpacing,
+ font->drawString(graphics, mCaption, mPadding + mImageSize + mSpacing,
mPadding);
BLOCK_END("CheckBox::draw")
}