summaryrefslogtreecommitdiff
path: root/src/gui/widgets/checkbox.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-17 18:31:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-17 18:31:26 +0300
commit3ae7d2eff3d20c3042ddac4fd4f205812079b94e (patch)
treef4fb1bc99383c05457e1958e4c825e285f2097ab /src/gui/widgets/checkbox.h
parentd0827ddf1686bdb97fab96f9f26dc95388919011 (diff)
downloadmv-3ae7d2eff3d20c3042ddac4fd4f205812079b94e.tar.gz
mv-3ae7d2eff3d20c3042ddac4fd4f205812079b94e.tar.bz2
mv-3ae7d2eff3d20c3042ddac4fd4f205812079b94e.tar.xz
mv-3ae7d2eff3d20c3042ddac4fd4f205812079b94e.zip
Extend checkbox theming.
New options: padding - padding from all sides except left imagePadding - padding from left before image imageSize - image size for computation width spacing - space between image and text width = imagePadding + imageSize + spacing + text width + padding height = padding + text height + padding
Diffstat (limited to 'src/gui/widgets/checkbox.h')
-rw-r--r--src/gui/widgets/checkbox.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index 654c48d62..0ca579d3b 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -28,6 +28,7 @@
#include "localconsts.h"
class Image;
+class Skin;
/**
* Check box widget. Same as the Guichan check box but with custom look.
@@ -78,16 +79,18 @@ class CheckBox final : public gcn::CheckBox
void keyPressed(gcn::KeyEvent& keyEvent) override;
+ void adjustSize();
+
private:
+ bool mHasMouse;
+ int mPadding;
+ int mImagePadding;
+ int mImageSize;
+ int mSpacing;
+
static int instances;
+ static Skin *mSkin;
static float mAlpha;
- bool mHasMouse;
- static Image *checkBoxNormal;
- static Image *checkBoxChecked;
- static Image *checkBoxDisabled;
- static Image *checkBoxDisabledChecked;
- static Image *checkBoxNormalHi;
- static Image *checkBoxCheckedHi;
};
#endif