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

LibVT: Unbreak semi-transparent terminal background painting

I broke semi-transparent terminals when I added support for alpha
blending to Painter::fill_rect().

When we fill the terminal widget background, we don't want blending to
take place, we're just looking to replace with an exact color, so now
we can use Painter::clear_rect() for that.
This commit is contained in:
Andreas Kling 2019-11-25 11:35:52 +01:00
parent c645d9fe4a
commit 7ef51293c7

View file

@ -260,9 +260,9 @@ void TerminalWidget::paint_event(GPaintEvent& event)
painter.add_clip_rect(terminal_buffer_rect);
if (m_visual_beep_timer->is_active())
painter.fill_rect(frame_inner_rect(), Color::Red);
painter.clear_rect(frame_inner_rect(), Color::Red);
else
painter.fill_rect(frame_inner_rect(), Color(Color::Black).with_alpha(m_opacity));
painter.clear_rect(frame_inner_rect(), Color(Color::Black).with_alpha(m_opacity));
invalidate_cursor();
int rows_from_history = 0;