From 5e33e0b52940e739f07e9c0955e61fc104c2d936 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Thu, 16 Jun 2011 22:45:56 +0200 Subject: Fix the off-by-one error reported in the issue comments. Trivial fix. --- src/gui/widgets/button.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index edf9e590..f072ef61 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -102,8 +102,7 @@ void Button::setButtonIcon(const std::string& iconFile, int frameHeight, mButtonIcon = new Image*[BUTTON_COUNT]; for (int mode = 0; mode < BUTTON_COUNT; ++mode) { - mButtonIcon[mode] = btnIcons->getSubImage(mode * frameWidth - + (mode ? 1 : 0), 0, + mButtonIcon[mode] = btnIcons->getSubImage(mode * frameWidth, 0, frameWidth, frameHeight); } -- cgit v1.2.3-70-g09d2