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

FontEditor: Simplify start-up

Previusly a cloned or newly loaded font was moved twice from main to
the constructor and then from constructor to an init routine where it
was finally used. The unmasked font is now moved only once, directly
to initialization, and redundant error checking is discarded.
This commit is contained in:
thankyouverycool 2021-11-29 09:07:47 -05:00 committed by Andreas Kling
parent 56a8a2b493
commit 922e80e72b
4 changed files with 20 additions and 34 deletions

View file

@ -20,6 +20,7 @@ class FontEditorWidget final : public GUI::Widget {
public:
virtual ~FontEditorWidget() override;
bool open_file(String const&);
bool save_as(const String&);
bool request_close();
void update_title();
@ -35,11 +36,10 @@ public:
Function<void()> on_initialize;
private:
FontEditorWidget(const String& path, RefPtr<Gfx::BitmapFont>&&);
FontEditorWidget();
virtual void drop_event(GUI::DropEvent&) override;
void open_file(String const&);
void undo();
void redo();
void did_modify_font();