mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibGUI: Set Editors to wrap at words when MultiLine
And default to NoWrap when they are type SingleLine.
This commit is contained in:
parent
9e81c2dc83
commit
5fedb742da
2 changed files with 4 additions and 2 deletions
|
@ -57,8 +57,10 @@ TextEditor::TextEditor(Type type)
|
||||||
if (is_single_line())
|
if (is_single_line())
|
||||||
set_visualize_trailing_whitespace(false);
|
set_visualize_trailing_whitespace(false);
|
||||||
set_scrollbars_enabled(is_multi_line());
|
set_scrollbars_enabled(is_multi_line());
|
||||||
if (is_multi_line())
|
if (is_multi_line()) {
|
||||||
set_font(Gfx::FontDatabase::default_fixed_width_font());
|
set_font(Gfx::FontDatabase::default_fixed_width_font());
|
||||||
|
set_wrapping_mode(WrappingMode::WrapAtWords);
|
||||||
|
}
|
||||||
vertical_scrollbar().set_step(line_height());
|
vertical_scrollbar().set_step(line_height());
|
||||||
m_cursor = { 0, 0 };
|
m_cursor = { 0, 0 };
|
||||||
m_automatic_selection_scroll_timer = add<Core::Timer>(100, [this] {
|
m_automatic_selection_scroll_timer = add<Core::Timer>(100, [this] {
|
||||||
|
|
|
@ -347,7 +347,7 @@ private:
|
||||||
bool m_needs_rehighlight { false };
|
bool m_needs_rehighlight { false };
|
||||||
bool m_has_pending_change_notification { false };
|
bool m_has_pending_change_notification { false };
|
||||||
bool m_automatic_indentation_enabled { false };
|
bool m_automatic_indentation_enabled { false };
|
||||||
WrappingMode m_wrapping_mode { WrappingMode::WrapAtWords };
|
WrappingMode m_wrapping_mode { WrappingMode::NoWrap };
|
||||||
bool m_visualize_trailing_whitespace { true };
|
bool m_visualize_trailing_whitespace { true };
|
||||||
bool m_visualize_leading_whitespace { false };
|
bool m_visualize_leading_whitespace { false };
|
||||||
bool m_cursor_line_highlighting { true };
|
bool m_cursor_line_highlighting { true };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue