1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibGUI: Fix TextEditor painting glitch after add_clip_rect() change

This commit is contained in:
Andreas Kling 2020-06-06 19:35:07 +02:00
parent ba6a77f281
commit 5c485d4a1e
Notes: sideshowbarker 2024-07-19 05:47:50 +09:00

View file

@ -402,6 +402,8 @@ void TextEditor::paint_event(PaintEvent& event)
width() - width_occupied_by_vertical_scrollbar() - ruler_width(),
height() - height_occupied_by_horizontal_scrollbar()
};
if (m_ruler_visible)
text_clip_rect.move_by(-ruler_width(), 0);
painter.add_clip_rect(text_clip_rect);
for (size_t line_index = first_visible_line; line_index <= last_visible_line; ++line_index) {