mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
GTextEditor: Take frame size into account when setting clip rect
The ruler right does not include the (already translated) frame size. Take that into account too, otherwise we overdraw the ruler. Fixes #23.
This commit is contained in:
parent
9308ce071f
commit
9b2fb47136
Notes:
sideshowbarker
2024-07-19 13:56:23 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/9b2fb471368 Pull-request: https://github.com/SerenityOS/serenity/pull/98
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ void GTextEditor::paint_event(GPaintEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
painter.add_clip_rect({ m_ruler_visible ? (ruler_rect.right() + 1) : 0, 0, width() - width_occupied_by_vertical_scrollbar() - ruler_width(), height() - height_occupied_by_horizontal_scrollbar() });
|
||||
painter.add_clip_rect({ m_ruler_visible ? (ruler_rect.right() + frame_thickness() + 1) : frame_thickness(), frame_thickness(), width() - width_occupied_by_vertical_scrollbar() - ruler_width(), height() - height_occupied_by_horizontal_scrollbar() });
|
||||
|
||||
for (int i = first_visible_line; i <= last_visible_line; ++i) {
|
||||
auto& line = *m_lines[i];
|
||||
|
|
Loading…
Reference in a new issue