mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
Terminal: Clip to the paint event rect
We should try to avoid painting any more than what we're asked to.
This commit is contained in:
parent
178788f19a
commit
ce6463ba76
1 changed files with 2 additions and 0 deletions
|
@ -175,6 +175,8 @@ void TerminalWidget::paint_event(GPaintEvent& event)
|
||||||
|
|
||||||
GPainter painter(*this);
|
GPainter painter(*this);
|
||||||
|
|
||||||
|
painter.add_clip_rect(event.rect());
|
||||||
|
|
||||||
if (m_visual_beep_timer.is_active())
|
if (m_visual_beep_timer.is_active())
|
||||||
painter.fill_rect(frame_inner_rect(), Color::Red);
|
painter.fill_rect(frame_inner_rect(), Color::Red);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue