1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:55:08 +00:00

GTextEditor: Relayout when the line-wrapping setting is changed

This commit is contained in:
Andreas Kling 2019-08-25 12:23:14 +02:00
parent 453ca65a96
commit 5aac652b4b
2 changed files with 12 additions and 1 deletions

View file

@ -1405,3 +1405,14 @@ void GTextEditor::Line::for_each_visual_line(Callback callback) const
++line_index;
}
}
void GTextEditor::set_line_wrapping_enabled(bool enabled)
{
if (m_line_wrapping_enabled == enabled)
return;
m_line_wrapping_enabled = enabled;
update_content_size();
recompute_all_visual_lines();
update();
}