diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-20 02:37:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-20 13:55:43 +0300 |
commit | 015b14f8e60d64da2999da9c753af62ec1ffdf72 (patch) | |
tree | 5a96c0573d7065fc4a3c87bf727c0645946c1222 /src/gui/widgets | |
parent | b6b4ea19929e7e67d987041aa129366f4fed3a6d (diff) | |
download | plus-015b14f8e60d64da2999da9c753af62ec1ffdf72.tar.gz plus-015b14f8e60d64da2999da9c753af62ec1ffdf72.tar.bz2 plus-015b14f8e60d64da2999da9c753af62ec1ffdf72.tar.xz plus-015b14f8e60d64da2999da9c753af62ec1ffdf72.zip |
Add palette inheritance to radiobutton class.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/progressindicator.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/radiogroup.cpp | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index 9b6726ce9..8ddd755ff 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -34,6 +34,7 @@ ProgressIndicator::ProgressIndicator() : gcn::Widget(), + Widget2(), mIndicator(nullptr) { ImageSet *const images = Theme::getImageSetFromTheme( diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index d7b1769ba..062c426d3 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -40,9 +40,11 @@ int RadioButton::instances = 0; Skin *RadioButton::mSkin = nullptr; float RadioButton::mAlpha = 1.0; -RadioButton::RadioButton(const std::string &caption, const std::string &group, +RadioButton::RadioButton(const Widget2 *const widget, + const std::string &caption, const std::string &group, const bool marked): gcn::RadioButton(caption, group, marked), + Widget2(widget), mHasMouse(false), mPadding(0), mImagePadding(0), diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h index a511a806f..8607c891b 100644 --- a/src/gui/widgets/radiobutton.h +++ b/src/gui/widgets/radiobutton.h @@ -42,8 +42,8 @@ class RadioButton final : public gcn::RadioButton, /** * Constructor. */ - RadioButton(const std::string &caption, const std::string &group, - const bool marked = false); + RadioButton(const Widget2 *const widget, const std::string &caption, + const std::string &group, const bool marked = false); A_DELETE_COPY(RadioButton) diff --git a/src/gui/widgets/radiogroup.cpp b/src/gui/widgets/radiogroup.cpp index 6e759cba8..3d20b7248 100644 --- a/src/gui/widgets/radiogroup.cpp +++ b/src/gui/widgets/radiogroup.cpp @@ -35,7 +35,8 @@ RadioGroup::RadioGroup(const Widget2 *const widget, gcn::Widget *RadioGroup::createWidget(const std::string &text) { - RadioButton *const widget = new RadioButton(text, mGroup, mCount == 0); + RadioButton *const widget = new RadioButton( + this, text, mGroup, mCount == 0); widget->adjustSize(); return widget; } |