summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-25 11:35:52 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-25 11:35:52 +0100
commit7ef51293c7924fd50e624c3ce39cfe7662eb6683 (patch)
tree692fc78f10ac973846e13be42e5683090f105c1c
parentc645d9fe4ac5a40749bfe8585b23ac1d43739c12 (diff)
downloadserenity-7ef51293c7924fd50e624c3ce39cfe7662eb6683.zip
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.
-rw-r--r--Libraries/LibVT/TerminalWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibVT/TerminalWidget.cpp b/Libraries/LibVT/TerminalWidget.cpp
index d498e70048..027970efa3 100644
--- a/Libraries/LibVT/TerminalWidget.cpp
+++ b/Libraries/LibVT/TerminalWidget.cpp
@@ -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;