summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-20 16:38:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-20 16:38:15 +0300
commit747dc30f256606e28fd932a9626da7c328114036 (patch)
tree1b3e7e70ba439d14d4936660d44c95c27816a11b /src/gui/widgets/button.cpp
parentcef2952156ab09371ed04beec00d0f1e8615ada9 (diff)
downloadmanaverse-747dc30f256606e28fd932a9626da7c328114036.tar.gz
manaverse-747dc30f256606e28fd932a9626da7c328114036.tar.bz2
manaverse-747dc30f256606e28fd932a9626da7c328114036.tar.xz
manaverse-747dc30f256606e28fd932a9626da7c328114036.zip
fix style in gui directory.
Diffstat (limited to 'src/gui/widgets/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp20
1 files changed, 16 insertions, 4 deletions
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++;
}