From 6ed69c8769cd6c8c79c77fc8116059b42f3653e7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 May 2013 17:02:05 +0300 Subject: add function to graphics class to set normal and outline colors at once. --- src/gui/widgets/textpreview.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/textpreview.cpp') 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); g->setColor2(Theme::getThemeColor(Theme::OUTLINE)); - } mFont->drawString(graphics, mText, mPadding + 1, mPadding + 1); BLOCK_END("TextPreview::draw") -- cgit v1.2.3-70-g09d2