mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibGUI: Reflow+update TextEditor widget after ruler visibility change
This commit is contained in:
parent
58106f57de
commit
088ae37541
Notes:
sideshowbarker
2024-07-18 20:36:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/088ae375410
@ -1806,4 +1806,13 @@ int TextEditor::number_of_visible_lines() const
|
|||||||
return visible_content_rect().height() / line_height();
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ public:
|
|||||||
void set_mode(const Mode);
|
void set_mode(const Mode);
|
||||||
|
|
||||||
bool is_ruler_visible() const { return m_ruler_visible; }
|
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*);
|
void set_icon(const Gfx::Bitmap*);
|
||||||
const Gfx::Bitmap* icon() const { return m_icon; }
|
const Gfx::Bitmap* icon() const { return m_icon; }
|
||||||
|
Loading…
Reference in New Issue
Block a user