From 84499779fcf0c8b5392a88f1c9311775e692ebef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Sep 2012 02:54:44 +0300 Subject: Improve a bit some gui controls speed. --- src/gui/widgets/icon.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/icon.cpp') 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(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); } } -- cgit v1.2.3-70-g09d2