diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-06 12:28:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-06 12:28:37 +0300 |
commit | ee13b712f0c9a285baf7a43e6d58b367dd6145f1 (patch) | |
tree | 6dff1003d5b75195578eec39ea6d44337f4744e4 /src/gui | |
parent | 0ea8c99f68bf6af25776914af324cb1c7632bc54 (diff) | |
download | manaverse-ee13b712f0c9a285baf7a43e6d58b367dd6145f1.tar.gz manaverse-ee13b712f0c9a285baf7a43e6d58b367dd6145f1.tar.bz2 manaverse-ee13b712f0c9a285baf7a43e6d58b367dd6145f1.tar.xz manaverse-ee13b712f0c9a285baf7a43e6d58b367dd6145f1.zip |
add outline color to radio button.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/theme.cpp | 1 | ||||
-rw-r--r-- | src/gui/theme.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.h | 1 |
4 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 0babc9dbb..9ed1f44a5 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -798,6 +798,7 @@ static int readColorType(const std::string &type) "LISTBOX_SELECTED", "LISTBOX_SELECTED_OUTLINE", "RADIOBUTTON", + "RADIOBUTTON_OUTLINE", "POPUP", "POPUP_OUTLINE", "TAB", diff --git a/src/gui/theme.h b/src/gui/theme.h index c56315355..a9aa8b2f5 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -238,6 +238,7 @@ class Theme final : public Palette, public ConfigListener LISTBOX_SELECTED, LISTBOX_SELECTED_OUTLINE, RADIOBUTTON, + RADIOBUTTON_OUTLINE, POPUP, POPUP_OUTLINE, TAB, diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index a2acf3d69..13f3fb237 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -46,7 +46,8 @@ RadioButton::RadioButton(const Widget2 *const widget, mPadding(0), mImagePadding(0), mImageSize(9), - mSpacing(2) + mSpacing(2), + mForegroundColor2(getThemeColor(Theme::RADIOBUTTON_OUTLINE)) { mForegroundColor = getThemeColor(Theme::RADIOBUTTON); if (instances == 0) @@ -156,7 +157,8 @@ void RadioButton::draw(gcn::Graphics* graphics) drawBox(graphics); gcn::Font *const font = getFont(); - graphics->setColor(mForegroundColor); + static_cast<Graphics *const>(graphics)->setColorAll( + mForegroundColor, mForegroundColor2); font->drawString(graphics, mCaption, mPadding + mImageSize + mSpacing, mPadding); diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h index 481d18408..50372e8c2 100644 --- a/src/gui/widgets/radiobutton.h +++ b/src/gui/widgets/radiobutton.h @@ -88,6 +88,7 @@ class RadioButton final : public gcn::RadioButton, int mImagePadding; int mImageSize; int mSpacing; + gcn::Color mForegroundColor2; }; #endif // RADIOBUTTON_H |