summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index 8e71d1ca3f..0aeae17aa7 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -418,16 +418,13 @@ void TextEditor::paint_event(PaintEvent& event)
};
if (is_displayonly() && is_focused()) {
- widget_background_color = palette().selection();
Gfx::IntRect display_rect {
widget_inner_rect().x() + 1,
widget_inner_rect().y() + 1,
widget_inner_rect().width() - 2,
widget_inner_rect().height() - 2
};
- painter.add_clip_rect(display_rect);
- painter.add_clip_rect(event.rect());
- painter.fill_rect(event.rect(), widget_background_color);
+ painter.fill_rect(display_rect, palette().selection());
}
painter.translate(frame_thickness(), frame_thickness());