mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +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
Notes:
sideshowbarker
2024-07-18 17:28:27 +09:00
Author: https://github.com/winfr34k 🔰
Commit: 883d0d2466
Pull-request: https://github.com/SerenityOS/serenity/pull/7417
Reviewed-by: https://github.com/linusg
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