diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-25 08:46:48 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-25 11:24:23 +0200 |
commit | 2e31b6627eab1f522a6d823de7913feee297a7aa (patch) | |
tree | 2204decf72d6e3ae73b212c30344e164f22b7c24 /Libraries/LibGUI | |
parent | 9752e683f676cfd1ab1bac9125c09fb84d0c8efa (diff) | |
download | serenity-2e31b6627eab1f522a6d823de7913feee297a7aa.zip |
GTextEditor: Take horizontal padding into account for line visual rects
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/GTextEditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/GTextEditor.cpp b/Libraries/LibGUI/GTextEditor.cpp index 19b90522a6..f5033b50b4 100644 --- a/Libraries/LibGUI/GTextEditor.cpp +++ b/Libraries/LibGUI/GTextEditor.cpp @@ -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> |