From d03dcbba2674854cac2d94c259a7ffb20026d188 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Oct 2012 20:28:25 +0300 Subject: Extend theming for textpreview. New theme file: textpreview.xml Theme option: padding --- src/gui/widgets/textpreview.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/textpreview.h') 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 -- cgit v1.2.3-60-g2f50