summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textpreview.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-04 17:02:05 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-04 17:02:05 +0300
commit6ed69c8769cd6c8c79c77fc8116059b42f3653e7 (patch)
tree48ede1453da63c58ba02ccc35ab06c3f7a61ddca /src/gui/widgets/textpreview.cpp
parent002656b278ab1c2e09bca8f6ffd2d5c42d57b09c (diff)
downloadManaVerse-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.tar.gz
ManaVerse-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.tar.bz2
ManaVerse-6ed69c8769cd6c8c79c77fc8116059b42f3653e7.tar.xz
ManaVerse-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.cpp10
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")