1
Fork 0
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:
Andreas Kling 2019-08-25 08:46:48 +02:00
parent 9752e683f6
commit 2e31b6627e

View file

@ -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>