mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:15:07 +00:00
GTextEditor: Take horizontal padding into account for line visual rects
This commit is contained in:
parent
9752e683f6
commit
2e31b6627e
1 changed files with 2 additions and 2 deletions
|
@ -1289,9 +1289,9 @@ void GTextEditor::Line::recompute_visual_lines()
|
|||
m_visual_line_breaks.append(length());
|
||||
|
||||
if (m_editor.is_line_wrapping_enabled())
|
||||
m_visual_rect = { 0, 0, available_width, m_visual_line_breaks.size() * m_editor.line_height() };
|
||||
m_visual_rect = { m_editor.m_horizontal_content_padding, 0, available_width, m_visual_line_breaks.size() * m_editor.line_height() };
|
||||
else
|
||||
m_visual_rect = { 0, 0, m_editor.font().width(view()), m_editor.line_height() };
|
||||
m_visual_rect = { m_editor.m_horizontal_content_padding, 0, m_editor.font().width(view()), m_editor.line_height() };
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue