1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

Piano: Fix cliping of bottom notes when scrolling in RollWidget

fixes #2577
This commit is contained in:
Peter Elliott 2020-07-06 16:15:12 -06:00 committed by Andreas Kling
parent b8cf07166f
commit e650be98a1

View file

@ -87,8 +87,8 @@ void RollWidget::paint_event(GUI::PaintEvent& event)
GUI::Painter painter(*this);
painter.translate(frame_thickness(), frame_thickness());
painter.translate(-horizontal_note_offset_remainder, -note_offset_remainder);
painter.add_clip_rect(event.rect());
painter.translate(-horizontal_note_offset_remainder, -note_offset_remainder);
for (int y = 0; y < notes_to_paint; ++y) {
int y_pos = y * note_height;