diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-15 18:46:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-15 18:47:59 +0300 |
commit | 18b6055c46e828f621192e6c9fa7ab6a6b1d99aa (patch) | |
tree | 014ed659a34d06d5570f6daebd52371982182c0b /src/gui/widgets/checkbox.cpp | |
parent | 76bd8cfad1f9dd7e1e61c69132dc02ec75e5ee8f (diff) | |
download | plus-18b6055c46e828f621192e6c9fa7ab6a6b1d99aa.tar.gz plus-18b6055c46e828f621192e6c9fa7ab6a6b1d99aa.tar.bz2 plus-18b6055c46e828f621192e6c9fa7ab6a6b1d99aa.tar.xz plus-18b6055c46e828f621192e6c9fa7ab6a6b1d99aa.zip |
add theme option into checkbox to hide X icon (draw box).
New theme option: drawBox
Diffstat (limited to 'src/gui/widgets/checkbox.cpp')
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index c8710c573..71783794b 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -47,7 +47,8 @@ CheckBox::CheckBox(const Widget2 *const widget, mImagePadding(0), mImageSize(9), mSpacing(2), - mHasMouse(false) + mHasMouse(false), + mDrawBox(true) { mForegroundColor2 = getThemeColor(Theme::CHECKBOX_OUTLINE); if (instances == 0) @@ -74,6 +75,7 @@ CheckBox::CheckBox(const Widget2 *const widget, mImagePadding = mSkin->getOption("imagePadding"); mImageSize = mSkin->getOption("imageSize"); mSpacing = mSkin->getOption("spacing"); + mDrawBox = mSkin->getOption("drawBox", 1); } adjustSize(); } @@ -129,7 +131,7 @@ void CheckBox::updateAlpha() void CheckBox::drawBox(gcn::Graphics *const graphics) { - if (!mSkin) + if (!mSkin || !mDrawBox) return; const ImageRect &rect = mSkin->getBorder(); |