diff options
-rw-r--r-- | data/graphics/gui/checkbox.xml | 1 | ||||
-rw-r--r-- | data/themes/golden-delicious/checkbox.xml | 1 | ||||
-rw-r--r-- | data/themes/jewelry/checkbox.xml | 1 | ||||
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/checkbox.h | 1 |
5 files changed, 8 insertions, 2 deletions
diff --git a/data/graphics/gui/checkbox.xml b/data/graphics/gui/checkbox.xml index cc5fdf242..b65bb5a44 100644 --- a/data/graphics/gui/checkbox.xml +++ b/data/graphics/gui/checkbox.xml @@ -5,6 +5,7 @@ <option name="imagePadding" value="0" /> <option name="imageSize" value="9" /> <option name="spacing" value="2" /> + <option name="drawBox" value="1" /> <part type="normal" xpos="0" ypos="0" width="9" height="9" /> <part type="checked" xpos="9" ypos="0" width="9" height="9" /> diff --git a/data/themes/golden-delicious/checkbox.xml b/data/themes/golden-delicious/checkbox.xml index 796d5fd7c..36044979e 100644 --- a/data/themes/golden-delicious/checkbox.xml +++ b/data/themes/golden-delicious/checkbox.xml @@ -5,6 +5,7 @@ <option name="imagePadding" value="8" /> <option name="imageSize" value="13" /> <option name="spacing" value="10" /> + <option name="drawBox" value="1" /> <part type="normal" xpos="0" ypos="0" width="13" height="13" /> <part type="checked" xpos="0" ypos="13" width="13" height="13" /> diff --git a/data/themes/jewelry/checkbox.xml b/data/themes/jewelry/checkbox.xml index 796d5fd7c..36044979e 100644 --- a/data/themes/jewelry/checkbox.xml +++ b/data/themes/jewelry/checkbox.xml @@ -5,6 +5,7 @@ <option name="imagePadding" value="8" /> <option name="imageSize" value="13" /> <option name="spacing" value="10" /> + <option name="drawBox" value="1" /> <part type="normal" xpos="0" ypos="0" width="13" height="13" /> <part type="checked" xpos="0" ypos="13" width="13" height="13" /> 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(); diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h index e23ffda46..c28eab90b 100644 --- a/src/gui/widgets/checkbox.h +++ b/src/gui/widgets/checkbox.h @@ -90,6 +90,7 @@ class CheckBox final : public gcn::CheckBox, int mImageSize; int mSpacing; bool mHasMouse; + bool mDrawBox; static int instances; static Skin *mSkin; |