summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-06 00:55:29 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-06 00:55:29 +0300
commit55924e43101deef978c6f73ed5a4da63fcb58705 (patch)
tree92dcd05de197cac01346d99096dce48709fe591d /src/gui/widgets/button.cpp
parent478a5fcaa06b001915bd8950c3ef807d73c571ca (diff)
downloadplus-55924e43101deef978c6f73ed5a4da63fcb58705.tar.gz
plus-55924e43101deef978c6f73ed5a4da63fcb58705.tar.bz2
plus-55924e43101deef978c6f73ed5a4da63fcb58705.tar.xz
plus-55924e43101deef978c6f73ed5a4da63fcb58705.zip
Add outline colors for button class.
Diffstat (limited to 'src/gui/widgets/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 1ae22aabe..0df94143e 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -71,9 +71,13 @@ Button::Button(const Widget2 *const widget) :
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(0),
@@ -100,9 +104,13 @@ Button::Button(const Widget2 *const widget,
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(0),
@@ -135,9 +143,13 @@ Button::Button(const Widget2 *const widget,
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(imageWidth),
@@ -170,9 +182,13 @@ Button::Button(const Widget2 *const widget, const std::string &imageName,
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(imageWidth),
@@ -347,16 +363,16 @@ void Button::draw(gcn::Graphics *graphics)
switch (mode)
{
case BUTTON_DISABLED:
- graphics->setColor(mDisabledColor);
+ g2->setColorAll(mDisabledColor, mDisabledColor2);
break;
case BUTTON_PRESSED:
- graphics->setColor(mPressedColor);
+ g2->setColorAll(mPressedColor, mPressedColor2);
break;
case BUTTON_HIGHLIGHTED:
- graphics->setColor(mHighlightedColor);
+ g2->setColorAll(mHighlightedColor, mHighlightedColor2);
break;
default:
- graphics->setColor(mEnabledColor);
+ g2->setColorAll(mEnabledColor, mEnabledColor2);
break;
}