summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textpreview.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-21 20:28:25 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-21 20:31:57 +0300
commitd03dcbba2674854cac2d94c259a7ffb20026d188 (patch)
treebbf84b3ddb74acc77e56adb5ce7c1e44ac90d76a /src/gui/widgets/textpreview.h
parent2f1886147d8dfd741ca95c9751f4f0e81b4cdd73 (diff)
downloadmv-d03dcbba2674854cac2d94c259a7ffb20026d188.tar.gz
mv-d03dcbba2674854cac2d94c259a7ffb20026d188.tar.bz2
mv-d03dcbba2674854cac2d94c259a7ffb20026d188.tar.xz
mv-d03dcbba2674854cac2d94c259a7ffb20026d188.zip
Extend theming for textpreview.
New theme file: textpreview.xml Theme option: padding
Diffstat (limited to 'src/gui/widgets/textpreview.h')
-rw-r--r--src/gui/widgets/textpreview.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index 5e84900ff..6af6cccf9 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -42,13 +42,15 @@ class TextPreview final : public gcn::Widget,
A_DELETE_COPY(TextPreview)
+ ~TextPreview();
+
/**
* Sets the color the text is printed in.
*
* @param color the color to set
*/
inline void setTextColor(const gcn::Color *color)
- { mTextColor = color; }
+ { mTextColor = color; adjustSize(); }
/**
* Sets the text to use the set alpha value.
@@ -122,6 +124,8 @@ class TextPreview final : public gcn::Widget,
bool isOpaque() const
{ return mOpaque; }
+ void adjustSize();
+
private:
gcn::Font *mFont;
std::string mText;
@@ -132,7 +136,10 @@ class TextPreview final : public gcn::Widget,
bool mOpaque;
bool mShadow;
bool mOutline;
+ int mPadding;
+ static int instances;
static float mAlpha;
+ static Skin *mSkin;
};
#endif