summaryrefslogtreecommitdiff
path: root/src/gui/widgets/icon.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-14 02:54:44 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-14 02:54:44 +0300
commit84499779fcf0c8b5392a88f1c9311775e692ebef (patch)
treef390326a50eed73d8f8c62107979a4d81093ce52 /src/gui/widgets/icon.cpp
parent4ee30f47b491de0ace9b692072fd286cf12c7828 (diff)
downloadmanaverse-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.gz
manaverse-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.bz2
manaverse-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.xz
manaverse-84499779fcf0c8b5392a88f1c9311775e692ebef.zip
Improve a bit some gui controls speed.
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r--src/gui/widgets/icon.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index e43f85af0..0236cde6a 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -57,8 +57,7 @@ void Icon::draw(gcn::Graphics *g)
if (mImage)
{
Graphics *const graphics = static_cast<Graphics*>(g);
- const int x = (getWidth() - mImage->mBounds.w) / 2;
- const int y = (getHeight() - mImage->mBounds.h) / 2;
- graphics->drawImage(mImage, x, y);
+ graphics->drawImage(mImage, (getWidth() - mImage->mBounds.w) / 2,
+ (getHeight() - mImage->mBounds.h) / 2);
}
}