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

Piano: Use CObject::custom_event() to simplify PianoWidget a bit.

This commit is contained in:
Andreas Kling 2019-07-14 10:28:10 +02:00
parent a634fab3c4
commit 2a9b627ae9
2 changed files with 3 additions and 6 deletions

View file

@ -355,10 +355,7 @@ void PianoWidget::render_knobs(GPainter& painter)
painter.draw_text(wave_knob_rect, wave_name, TextAlignment::Center, Color(r, g, b));
}
void PianoWidget::event(CEvent& event)
void PianoWidget::custom_event(CCustomEvent&)
{
if (event.type() == CEvent::Custom) {
update();
}
GWidget::event(event);
update();
}