diff options
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r-- | src/gui/widgets/icon.cpp | 5 |
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); } } |