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:
parent
a634fab3c4
commit
2a9b627ae9
2 changed files with 3 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue