mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
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.
This commit is contained in:
parent
ad6587424f
commit
883d0d2466
1 changed files with 7 additions and 2 deletions
|
@ -23,8 +23,13 @@ FontSettingsWidget::FontSettingsWidget()
|
|||
auto& fixed_width_font_label = *find_descendant_of_type_named<GUI::Label>("fixed_width_font_label");
|
||||
auto& fixed_width_font_button = *find_descendant_of_type_named<GUI::Button>("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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue