summaryrefslogtreecommitdiff
path: root/Widgets/Label.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-11 00:10:36 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-11 00:10:36 +0200
commitcb64ff229ac0e805e8ab88041f23659b719d9b74 (patch)
tree8d109eaadb907a4d13f65aabf047d3544f140e61 /Widgets/Label.cpp
parent77bac7216cbd3bc102f53bec594b9178fc139655 (diff)
downloadserenity-cb64ff229ac0e805e8ab88041f23659b719d9b74.zip
More work on the bitmap font.
Diffstat (limited to 'Widgets/Label.cpp')
-rw-r--r--Widgets/Label.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Widgets/Label.cpp b/Widgets/Label.cpp
index 14f9448c52..ab761702bf 100644
--- a/Widgets/Label.cpp
+++ b/Widgets/Label.cpp
@@ -22,8 +22,9 @@ void Label::setText(String&& text)
void Label::onPaint(PaintEvent&)
{
Painter painter(*this);
- painter.fillRect({ 0, 0, width(), height() }, Color(0xc0, 0xc0, 0xc0));
- painter.drawText({ 4, 4 }, text());
+ painter.fillRect({ 0, 0, width(), height() }, Color(0x0, 0x0, 0x0));
+ if (!text().isEmpty())
+ painter.drawText({ 4, 4 }, text(), Color(0xff, 0xff, 0xff));
}
void Label::onMouseMove(MouseEvent& event)