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

Use fooEvent() type names for the virtual event handlers.

This commit is contained in:
Andreas Kling 2018-10-13 22:51:50 +02:00
parent dfb70ed234
commit a3fb19fe9c
20 changed files with 84 additions and 84 deletions

View file

@ -19,7 +19,7 @@ void Label::setText(String&& text)
update();
}
void Label::onPaint(PaintEvent&)
void Label::paintEvent(PaintEvent&)
{
Painter painter(*this);
painter.fillRect({ 0, 0, width(), height() }, backgroundColor());
@ -27,9 +27,9 @@ void Label::onPaint(PaintEvent&)
painter.drawText({ 4, 4, width(), height() }, text(), Painter::TextAlignment::TopLeft, foregroundColor());
}
void Label::onMouseMove(MouseEvent& event)
void Label::mouseMoveEvent(MouseEvent& event)
{
printf("Label::onMouseMove: x=%d, y=%d\n", event.x(), event.y());
Widget::onMouseMove(event);
printf("Label::mouseMoveEvent: x=%d, y=%d\n", event.x(), event.y());
Widget::mouseMoveEvent(event);
}