From 747dc30f256606e28fd932a9626da7c328114036 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 20 Apr 2013 16:38:15 +0300 Subject: fix style in gui directory. --- src/gui/widgets/button.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets/button.cpp') diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index ec0215206..1ae22aabe 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -70,6 +70,10 @@ Button::Button(const Widget2 *const widget) : mMode(0), mXOffset(0), mYOffset(0), + mEnabledColor(getThemeColor(Theme::BUTTON)), + mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)), + mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)), + mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)), mImages(nullptr), mImageSet(nullptr), mImageWidth(0), @@ -95,6 +99,10 @@ Button::Button(const Widget2 *const widget, mMode(0), mXOffset(0), mYOffset(0), + mEnabledColor(getThemeColor(Theme::BUTTON)), + mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)), + mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)), + mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)), mImages(nullptr), mImageSet(nullptr), mImageWidth(0), @@ -126,6 +134,10 @@ Button::Button(const Widget2 *const widget, mMode(0), mXOffset(0), mYOffset(0), + mEnabledColor(getThemeColor(Theme::BUTTON)), + mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)), + mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)), + mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)), mImages(nullptr), mImageSet(nullptr), mImageWidth(imageWidth), @@ -157,6 +169,10 @@ Button::Button(const Widget2 *const widget, const std::string &imageName, mMode(0), mXOffset(0), mYOffset(0), + mEnabledColor(getThemeColor(Theme::BUTTON)), + mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)), + mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)), + mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)), mImages(nullptr), mImageSet(nullptr), mImageWidth(imageWidth), @@ -192,10 +208,6 @@ void Button::init() updateAlpha(); } - mEnabledColor = getThemeColor(Theme::BUTTON); - mDisabledColor = getThemeColor(Theme::BUTTON_DISABLED); - mHighlightedColor = getThemeColor(Theme::BUTTON_HIGHLIGHTED); - mPressedColor = getThemeColor(Theme::BUTTON_PRESSED); mInstances++; } -- cgit v1.2.3-70-g09d2