LibGUI: Reflow+update TextEditor widget after ruler visibility change

This commit is contained in:
Andreas Kling 2021-04-10 00:09:44 +02:00
parent 58106f57de
commit 088ae37541
Notes: sideshowbarker 2024-07-18 20:36:37 +09:00
2 changed files with 10 additions and 1 deletions

View File

@ -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();
}
}

View File

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