1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

LibGUI+Applications: Let GlyphMapWidget initialize a null Font

FontEditor will need to clear references to its mutable font in
the future while CharacterMap has no use for the highlights clone,
so let's convert GlyphMapWidget's set_font wrapper into a separate
initialize function for the editor and stop hiding the base function
for others. Setting font null in either ultimately points the map to
the system's default font.
This commit is contained in:
thankyouverycool 2023-05-10 17:01:08 -04:00 committed by Andreas Kling
parent cf4ddd1dcf
commit 0ad5e85163
4 changed files with 8 additions and 6 deletions

View file

@ -167,8 +167,7 @@ ErrorOr<void> CharacterMapWidget::initialize_menubar(GUI::Window& window)
void CharacterMapWidget::did_change_font()
{
// No need to track glyph modifications by cloning
m_glyph_map->GUI::AbstractScrollableWidget::set_font(font());
m_glyph_map->set_font(font());
m_font_name_label->set_text(String::from_deprecated_string(font().human_readable_name()).release_value_but_fixme_should_propagate_errors());
m_output_box->set_font(font());
}