mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
LibGUI: Fix broken clip rect when scrolling a TextEditor
This commit is contained in:
parent
731685468a
commit
984a6ff97b
1 changed files with 1 additions and 0 deletions
|
@ -404,6 +404,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
||||||
};
|
};
|
||||||
if (m_ruler_visible)
|
if (m_ruler_visible)
|
||||||
text_clip_rect.move_by(-ruler_width(), 0);
|
text_clip_rect.move_by(-ruler_width(), 0);
|
||||||
|
text_clip_rect.move_by(horizontal_scrollbar().value(), vertical_scrollbar().value());
|
||||||
painter.add_clip_rect(text_clip_rect);
|
painter.add_clip_rect(text_clip_rect);
|
||||||
|
|
||||||
for (size_t line_index = first_visible_line; line_index <= last_visible_line; ++line_index) {
|
for (size_t line_index = first_visible_line; line_index <= last_visible_line; ++line_index) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue