mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +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:
parent
2e11c16be4
commit
a6e2125727
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,8 @@ TextEditor::TextEditor(Type type)
|
||||||
set_foreground_role(ColorRole::BaseText);
|
set_foreground_role(ColorRole::BaseText);
|
||||||
set_document(TextDocument::create());
|
set_document(TextDocument::create());
|
||||||
set_scrollbars_enabled(is_multi_line());
|
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());
|
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] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue