summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/theme.cpp4
-rw-r--r--src/gui/theme.h4
-rw-r--r--src/gui/widgets/button.cpp24
-rw-r--r--src/gui/widgets/button.h4
4 files changed, 32 insertions, 4 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 58d7e8245..e4f78efd2 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -781,9 +781,13 @@ static int readColorType(const std::string &type)
"BORDER",
"PROGRESS_BAR",
"BUTTON",
+ "BUTTON_OUTLINE",
"BUTTON_DISABLED",
+ "BUTTON_DISABLED_OUTLINE",
"BUTTON_HIGHLIGHTED",
+ "BUTTON_HIGHLIGHTED_OUTLINE",
"BUTTON_PRESSED",
+ "BUTTON_PRESSED_OUTLINE",
"CHECKBOX",
"DROPDOWN",
"LABEL",
diff --git a/src/gui/theme.h b/src/gui/theme.h
index ca4204a36..579c34b8a 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -221,9 +221,13 @@ class Theme final : public Palette, public ConfigListener
BORDER,
PROGRESS_BAR,
BUTTON,
+ BUTTON_OUTLINE,
BUTTON_DISABLED,
+ BUTTON_DISABLED_OUTLINE,
BUTTON_HIGHLIGHTED,
+ BUTTON_HIGHLIGHTED_OUTLINE,
BUTTON_PRESSED,
+ BUTTON_PRESSED_OUTLINE,
CHECKBOX,
DROPDOWN,
LABEL,
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;
}
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 90faa7d06..2fa2d64ac 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -153,9 +153,13 @@ class Button final : public gcn::Button,
int mXOffset;
int mYOffset;
gcn::Color mEnabledColor;
+ gcn::Color mEnabledColor2;
gcn::Color mDisabledColor;
+ gcn::Color mDisabledColor2;
gcn::Color mHighlightedColor;
+ gcn::Color mHighlightedColor2;
gcn::Color mPressedColor;
+ gcn::Color mPressedColor2;
Image **mImages;
ImageSet *mImageSet;
int mImageWidth;