From 9a28c8dc7482ed1426eaa9a85fa9993035bc5f61 Mon Sep 17 00:00:00 2001 From: Tobias Christiansen Date: Sun, 23 Jan 2022 23:01:23 +0100 Subject: [PATCH] LibGUI: Fix broken text rendering in TextEditor This patch reintroduces the translation previously mistakenly removed when adding support for different underline-styles. Thanks for reporting the bug, kennethmyhra! --- Userland/Libraries/LibGUI/TextEditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index e2d40c0035..146b186873 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -550,6 +550,7 @@ void TextEditor::paint_event(PaintEvent& event) painter.fill_rect(span_rect, text_attributes.background_color.value()); } draw_text(span_rect, text, *font, m_text_alignment, text_attributes); + span_rect.translate_by(span_rect.width(), 0); }; for (;;) { if (span_index >= document().spans().size()) {