1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

More work on the bitmap font.

This commit is contained in:
Andreas Kling 2018-10-11 00:10:36 +02:00
parent 77bac7216c
commit cb64ff229a
3 changed files with 570 additions and 48 deletions

View file

@ -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)