mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
GTextEditor: Relayout when the line-wrapping setting is changed
This commit is contained in:
parent
453ca65a96
commit
5aac652b4b
2 changed files with 12 additions and 1 deletions
|
@ -1405,3 +1405,14 @@ void GTextEditor::Line::for_each_visual_line(Callback callback) const
|
||||||
++line_index;
|
++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();
|
||||||
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ public:
|
||||||
void set_automatic_indentation_enabled(bool enabled) { m_automatic_indentation_enabled = enabled; }
|
void set_automatic_indentation_enabled(bool enabled) { m_automatic_indentation_enabled = enabled; }
|
||||||
|
|
||||||
bool is_line_wrapping_enabled() const { return m_line_wrapping_enabled; }
|
bool is_line_wrapping_enabled() const { return m_line_wrapping_enabled; }
|
||||||
void set_line_wrapping_enabled(bool enabled) { m_line_wrapping_enabled = enabled; }
|
void set_line_wrapping_enabled(bool);
|
||||||
|
|
||||||
TextAlignment text_alignment() const { return m_text_alignment; }
|
TextAlignment text_alignment() const { return m_text_alignment; }
|
||||||
void set_text_alignment(TextAlignment);
|
void set_text_alignment(TextAlignment);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue