summaryrefslogtreecommitdiff
path: root/src/gui/widgets/label.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 20:49:56 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:06 +0300
commitf799d0cc056be8850733be931c976d59e6dbe582 (patch)
treee8f589d823c3782096d2ab2ec78d2985f5ac7a3d /src/gui/widgets/label.cpp
parentac1fb0ec902814316562552fc8d52bc5683e5f9d (diff)
downloadplus-f799d0cc056be8850733be931c976d59e6dbe582.tar.gz
plus-f799d0cc056be8850733be931c976d59e6dbe582.tar.bz2
plus-f799d0cc056be8850733be931c976d59e6dbe582.tar.xz
plus-f799d0cc056be8850733be931c976d59e6dbe582.zip
Add outlining support for labels.
Diffstat (limited to 'src/gui/widgets/label.cpp')
-rw-r--r--src/gui/widgets/label.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index 04bb38662..2be9a476b 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -92,6 +92,7 @@ void Label::draw(gcn::Graphics* graphics)
}
graphics->setColor(mForegroundColor);
+ static_cast<Graphics*>(graphics)->setColor2(mForegroundColor2);
font->drawString(graphics, mCaption, textX, textY);
BLOCK_END("Label::draw")
}
@@ -101,3 +102,16 @@ void Label::adjustSize()
setWidth(getFont()->getWidth(getCaption()) + 2 * mPadding);
setHeight(getFont()->getHeight() + 2 * mPadding);
}
+
+void Label::setForegroundColor(const gcn::Color &color)
+{
+ mForegroundColor = color;
+ mForegroundColor2 = color;
+}
+
+void Label::setForegroundColorAll(const gcn::Color &color1,
+ const gcn::Color &color2)
+{
+ mForegroundColor = color1;
+ mForegroundColor2 = color2;
+}