LibGUI: Disable whitespace visualization in single-line text editors

You can enable it manually if you really want it, of course. :^)
This commit is contained in:
Andreas Kling 2020-09-01 23:57:30 +02:00
parent aa70d8c217
commit dec3998b3c
Notes: sideshowbarker 2024-07-19 02:55:49 +09:00

View file

@ -57,6 +57,8 @@ TextEditor::TextEditor(Type type)
set_background_role(ColorRole::Base);
set_foreground_role(ColorRole::BaseText);
set_document(TextDocument::create());
if (is_single_line())
set_visualize_trailing_whitespace(false);
set_scrollbars_enabled(is_multi_line());
if (is_multi_line())
set_font(Gfx::Font::default_fixed_width_font());