1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

Terminal: Clip out the scrollbar when painting the terminal buffer

This avoids the terminal background color sometimes flashing through
the scrollbar for a brief moment.
This commit is contained in:
Andreas Kling 2019-11-10 13:00:03 +01:00
parent 3a01df9fb1
commit 528e6b27f6

View file

@ -245,6 +245,9 @@ void TerminalWidget::paint_event(GPaintEvent& event)
painter.add_clip_rect(event.rect());
Rect terminal_buffer_rect(frame_inner_rect().top_left(), { frame_inner_rect().width() - m_scrollbar->width(), frame_inner_rect().height() });
painter.add_clip_rect(terminal_buffer_rect);
if (m_visual_beep_timer->is_active())
painter.fill_rect(frame_inner_rect(), Color::Red);
else