diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-18 16:40:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-18 16:48:54 +0200 |
commit | a6e21257279443e94f4258404035a9c13c4d44e1 (patch) | |
tree | edc0ddc9944ad825ceea2b599013192a7a528150 /Libraries | |
parent | 2e11c16be4bd58fb5668728c5664cd4a319dd316 (diff) | |
download | serenity-a6e21257279443e94f4258404035a9c13c4d44e1.zip |
LibGUI: Use a variable-width font by default in single-line TextEditors
This makes things like the Browser location bar look way nicer. :^)
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGUI/TextEditor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp index f3b13503eb..3725bbc119 100644 --- a/Libraries/LibGUI/TextEditor.cpp +++ b/Libraries/LibGUI/TextEditor.cpp @@ -58,7 +58,8 @@ TextEditor::TextEditor(Type type) set_foreground_role(ColorRole::BaseText); set_document(TextDocument::create()); set_scrollbars_enabled(is_multi_line()); - set_font(FontDatabase::the().get_by_name("Csilla Thin")); + if (is_multi_line()) + set_font(Gfx::Font::default_fixed_width_font()); vertical_scrollbar().set_step(line_height()); m_cursor = { 0, 0 }; m_automatic_selection_scroll_timer = add<Core::Timer>(100, [this] { |