diff options
-rw-r--r-- | Userland/Libraries/LibGUI/TextEditor.cpp | 9 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/TextEditor.h | 2 |
2 files changed, 10 insertions, 1 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(); +} + } diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h index 3abb87b1d6..d7e1a1a644 100644 --- a/Userland/Libraries/LibGUI/TextEditor.h +++ b/Userland/Libraries/LibGUI/TextEditor.h @@ -108,7 +108,7 @@ public: void set_mode(const Mode); bool is_ruler_visible() const { return m_ruler_visible; } - void set_ruler_visible(bool b) { m_ruler_visible = b; } + void set_ruler_visible(bool); void set_icon(const Gfx::Bitmap*); const Gfx::Bitmap* icon() const { return m_icon; } |