diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-10 00:09:44 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-10 00:09:44 +0200 |
commit | 088ae37541001c11e47276189df114b863ee8aa1 (patch) | |
tree | 4899d373954da24230183b82606593c075e053bc /Userland/Libraries/LibGUI/TextEditor.cpp | |
parent | 58106f57deb7ae743e5a6527ca892fb75350a04f (diff) | |
download | serenity-088ae37541001c11e47276189df114b863ee8aa1.zip |
LibGUI: Reflow+update TextEditor widget after ruler visibility change
Diffstat (limited to 'Userland/Libraries/LibGUI/TextEditor.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/TextEditor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index 56b6a8be54..bbf1ae116f 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -1806,4 +1806,13 @@ int TextEditor::number_of_visible_lines() const return visible_content_rect().height() / line_height(); } +void TextEditor::set_ruler_visible(bool visible) +{ + if (m_ruler_visible == visible) + return; + m_ruler_visible = visible; + recompute_all_visual_lines(); + update(); +} + } |