diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-23 10:57:42 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-23 11:10:52 +0100 |
commit | 3d20da9ee451460b6e233f5efdf5a13e11525f97 (patch) | |
tree | 524b72d0874304c68036dbbc0514b632a4a08c59 /Applications/FontEditor | |
parent | 7ec758773cdd85755d91f52614f361e7e750c7e9 (diff) | |
download | serenity-3d20da9ee451460b6e233f5efdf5a13e11525f97.zip |
Userspace: Use Core::Object::add() when building interfaces
Diffstat (limited to 'Applications/FontEditor')
-rw-r--r-- | Applications/FontEditor/FontEditor.cpp | 4 | ||||
-rw-r--r-- | Applications/FontEditor/GlyphEditorWidget.cpp | 5 | ||||
-rw-r--r-- | Applications/FontEditor/GlyphEditorWidget.h | 2 | ||||
-rw-r--r-- | Applications/FontEditor/GlyphMapWidget.cpp | 5 | ||||
-rw-r--r-- | Applications/FontEditor/GlyphMapWidget.h | 2 |
5 files changed, 8 insertions, 10 deletions
diff --git a/Applications/FontEditor/FontEditor.cpp b/Applications/FontEditor/FontEditor.cpp index 92e2fce624..1dfa4f2c0a 100644 --- a/Applications/FontEditor/FontEditor.cpp +++ b/Applications/FontEditor/FontEditor.cpp @@ -50,10 +50,10 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Gfx::Font>&& edite else m_path = path; - m_glyph_map_widget = GlyphMapWidget::construct(*m_edited_font, this); + m_glyph_map_widget = add<GlyphMapWidget>(*m_edited_font); m_glyph_map_widget->move_to({ 90, 5 }); - m_glyph_editor_widget = GlyphEditorWidget::construct(*m_edited_font, this); + m_glyph_editor_widget = add<GlyphEditorWidget>(*m_edited_font); m_glyph_editor_widget->move_to({ 5, 5 }); m_ui = make<UI_FontEditorBottom>(); diff --git a/Applications/FontEditor/GlyphEditorWidget.cpp b/Applications/FontEditor/GlyphEditorWidget.cpp index 58bcc15618..1d0c350a9e 100644 --- a/Applications/FontEditor/GlyphEditorWidget.cpp +++ b/Applications/FontEditor/GlyphEditorWidget.cpp @@ -29,9 +29,8 @@ #include <LibGfx/Font.h> #include <LibGfx/Palette.h> -GlyphEditorWidget::GlyphEditorWidget(Gfx::Font& mutable_font, GUI::Widget* parent) - : GUI::Frame(parent) - , m_font(mutable_font) +GlyphEditorWidget::GlyphEditorWidget(Gfx::Font& mutable_font) + : m_font(mutable_font) { set_frame_thickness(2); set_frame_shadow(Gfx::FrameShadow::Sunken); diff --git a/Applications/FontEditor/GlyphEditorWidget.h b/Applications/FontEditor/GlyphEditorWidget.h index 5476482872..df6cfbfa1a 100644 --- a/Applications/FontEditor/GlyphEditorWidget.h +++ b/Applications/FontEditor/GlyphEditorWidget.h @@ -44,7 +44,7 @@ public: Function<void(u8)> on_glyph_altered; private: - GlyphEditorWidget(Gfx::Font&, GUI::Widget* parent); + GlyphEditorWidget(Gfx::Font&); virtual void paint_event(GUI::PaintEvent&) override; virtual void mousedown_event(GUI::MouseEvent&) override; virtual void mousemove_event(GUI::MouseEvent&) override; diff --git a/Applications/FontEditor/GlyphMapWidget.cpp b/Applications/FontEditor/GlyphMapWidget.cpp index bd0329c39e..f057b46bb7 100644 --- a/Applications/FontEditor/GlyphMapWidget.cpp +++ b/Applications/FontEditor/GlyphMapWidget.cpp @@ -29,9 +29,8 @@ #include <LibGfx/Font.h> #include <LibGfx/Palette.h> -GlyphMapWidget::GlyphMapWidget(Gfx::Font& mutable_font, GUI::Widget* parent) - : GUI::Frame(parent) - , m_font(mutable_font) +GlyphMapWidget::GlyphMapWidget(Gfx::Font& mutable_font) + : m_font(mutable_font) { set_frame_thickness(2); set_frame_shape(Gfx::FrameShape::Container); diff --git a/Applications/FontEditor/GlyphMapWidget.h b/Applications/FontEditor/GlyphMapWidget.h index 4598585b63..e9a9866ff5 100644 --- a/Applications/FontEditor/GlyphMapWidget.h +++ b/Applications/FontEditor/GlyphMapWidget.h @@ -51,7 +51,7 @@ public: Function<void(u8)> on_glyph_selected; private: - GlyphMapWidget(Gfx::Font&, GUI::Widget* parent); + explicit GlyphMapWidget(Gfx::Font&); virtual void paint_event(GUI::PaintEvent&) override; virtual void mousedown_event(GUI::MouseEvent&) override; |