1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

More hacking on Widgets.

This commit is contained in:
Andreas Kling 2018-10-11 01:48:09 +02:00
parent aee66e0119
commit f337616741
15 changed files with 135 additions and 19 deletions

View file

@ -24,7 +24,7 @@ void Label::onPaint(PaintEvent&)
Painter painter(*this);
painter.fillRect({ 0, 0, width(), height() }, Color(0x0, 0x0, 0x0));
if (!text().isEmpty())
painter.drawText({ 4, 4 }, text(), Color(0xff, 0xff, 0xff));
painter.drawText({ 4, 4, width(), height() }, text(), Painter::TextAlignment::TopLeft, Color(0xff, 0xff, 0xff));
}
void Label::onMouseMove(MouseEvent& event)