From 7900408adc2b6db601373de2730a80707ec4c837 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Dec 2012 01:34:04 +0300 Subject: Fix different warnings from previous commits. --- src/gui/widgets/button.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/button.cpp') diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index f0337766f..265815929 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -377,8 +377,8 @@ void Button::draw(gcn::Graphics *graphics) const int width = font->getWidth(mCaption); if (mImages) { - const int width = width + mImageWidth + spacing; - imageX = getWidth() / 2 - width / 2; + const int w = width + mImageWidth + spacing; + imageX = (getWidth() - w) / 2; textX = imageX + mImageWidth + spacing - width / 2; } else -- cgit v1.2.3-60-g2f50