From 883d0d24663f9d4ef62a2bd4675791ccbd5acc3e Mon Sep 17 00:00:00 2001 From: Thomas Keppler Date: Sun, 23 May 2021 17:07:38 +0200 Subject: [PATCH] FontSettingsWidget: Display the default (fixed-width) font's name Previously, the font was applied to the Labels but the name wasn't updated on initial startup. This meant that the Label's content was only correct in the default state but not if the user changed the defaults. --- .../Applications/DisplaySettings/FontSettingsWidget.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp b/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp index c479f45eb4..323df514f2 100644 --- a/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp @@ -23,8 +23,13 @@ FontSettingsWidget::FontSettingsWidget() auto& fixed_width_font_label = *find_descendant_of_type_named("fixed_width_font_label"); auto& fixed_width_font_button = *find_descendant_of_type_named("fixed_width_font_button"); - default_font_label.set_font(Gfx::FontDatabase::default_font()); - fixed_width_font_label.set_font(Gfx::FontDatabase::default_fixed_width_font()); + auto& default_font = Gfx::FontDatabase::default_font(); + default_font_label.set_font(default_font); + default_font_label.set_text(default_font.qualified_name()); + + auto& default_fixed_width_font = Gfx::FontDatabase::default_fixed_width_font(); + fixed_width_font_label.set_font(default_fixed_width_font); + fixed_width_font_label.set_text(default_fixed_width_font.qualified_name()); default_font_button.on_click = [this, &default_font_label] { auto font_picker = GUI::FontPicker::construct(window(), &default_font_label.font(), false);