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

FontEditor: Let GlyphEditorWidget initialize a null BitmapFont

And remove public reference getters as there is no guarantee they are
nonnull.
This commit is contained in:
thankyouverycool 2023-05-10 17:01:12 -04:00 committed by Andreas Kling
parent 0ad5e85163
commit 24046f9adf
3 changed files with 23 additions and 25 deletions

View file

@ -653,7 +653,7 @@ ErrorOr<void> MainWidget::initialize(StringView path, RefPtr<Gfx::BitmapFont>&&
if (m_preview_label)
m_preview_label->set_font(*m_font);
m_glyph_editor_widget->set_font(*m_font);
m_glyph_editor_widget->initialize(m_font);
m_glyph_editor_widget->set_fixed_size(m_glyph_editor_widget->preferred_width(), m_glyph_editor_widget->preferred_height());
m_glyph_editor_widget->set_glyph(active_glyph);