diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-04 17:02:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-04 17:02:05 +0300 |
commit | 6ed69c8769cd6c8c79c77fc8116059b42f3653e7 (patch) | |
tree | 48ede1453da63c58ba02ccc35ab06c3f7a61ddca /src/gui/widgets/textpreview.cpp | |
parent | 002656b278ab1c2e09bca8f6ffd2d5c42d57b09c (diff) | |
download | mv-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.tar.gz mv-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.tar.bz2 mv-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.tar.xz mv-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.zip |
add function to graphics class to set normal and outline colors at once.
Diffstat (limited to 'src/gui/widgets/textpreview.cpp')
-rw-r--r-- | src/gui/widgets/textpreview.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp index ceede7133..bea96e72a 100644 --- a/src/gui/widgets/textpreview.cpp +++ b/src/gui/widgets/textpreview.cpp @@ -114,16 +114,12 @@ void TextPreview::draw(gcn::Graphics* graphics) } } - g->setColor(gcn::Color(mTextColor->r, mTextColor->g, - mTextColor->b, alpha)); - g->setColor2(gcn::Color(mTextColor2->r, mTextColor2->g, - mTextColor2->b, alpha)); + g->setColorAll(gcn::Color(mTextColor->r, mTextColor->g, mTextColor->b, + alpha), gcn::Color(mTextColor2->r, mTextColor2->g, mTextColor2->b, + alpha)); if (mOutline && mTextColor != mTextColor2) - { - Graphics *const g = static_cast<Graphics *const>(graphics); g->setColor2(Theme::getThemeColor(Theme::OUTLINE)); - } mFont->drawString(graphics, mText, mPadding + 1, mPadding + 1); BLOCK_END("TextPreview::draw") |