diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-21 20:28:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-21 20:31:57 +0300 |
commit | d03dcbba2674854cac2d94c259a7ffb20026d188 (patch) | |
tree | bbf84b3ddb74acc77e56adb5ce7c1e44ac90d76a /src/gui/widgets/textpreview.h | |
parent | 2f1886147d8dfd741ca95c9751f4f0e81b4cdd73 (diff) | |
download | plus-d03dcbba2674854cac2d94c259a7ffb20026d188.tar.gz plus-d03dcbba2674854cac2d94c259a7ffb20026d188.tar.bz2 plus-d03dcbba2674854cac2d94c259a7ffb20026d188.tar.xz plus-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.h | 9 |
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 |