1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

LibGUI: Use a variable-width font by default in single-line TextEditors

This makes things like the Browser location bar look way nicer. :^)
This commit is contained in:
Andreas Kling 2020-05-18 16:40:40 +02:00
parent 2e11c16be4
commit a6e2125727

View file

@ -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] {