Skip to content

Commit

Permalink
Terminal: Clip out the scrollbar when painting the terminal buffer
Browse files Browse the repository at this point in the history
This avoids the terminal background color sometimes flashing through
the scrollbar for a brief moment.
  • Loading branch information
awesomekling committed Nov 10, 2019
1 parent 3a01df9 commit 528e6b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Libraries/LibVT/TerminalWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 528e6b2

Please sign in to comment.