1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:37:34 +00:00

LibGUI: Convert remaining random little things to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 19:39:37 +02:00
parent 81a5c4fc56
commit 409494193e
11 changed files with 15 additions and 13 deletions

View file

@ -23,10 +23,10 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Font>&& edited_fon
else
m_path = path;
m_glyph_map_widget = new GlyphMapWidget(*m_edited_font, this);
m_glyph_map_widget = GlyphMapWidget::construct(*m_edited_font, this);
m_glyph_map_widget->move_to({ 90, 5 });
m_glyph_editor_widget = new GlyphEditorWidget(*m_edited_font, this);
m_glyph_editor_widget = GlyphEditorWidget::construct(*m_edited_font, this);
m_glyph_editor_widget->move_to({ 5, 5 });
m_ui = make<UI_FontEditorBottom>();

View file

@ -2,8 +2,8 @@
#include <LibGUI/GFrame.h>
class GlyphEditorWidget final : public GFrame {
C_OBJECT(GlyphEditorWidget)
public:
GlyphEditorWidget(Font&, GWidget* parent);
virtual ~GlyphEditorWidget() override;
u8 glyph() const { return m_glyph; }
@ -18,6 +18,7 @@ public:
Function<void(u8)> on_glyph_altered;
private:
GlyphEditorWidget(Font&, GWidget* parent);
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;

View file

@ -4,8 +4,8 @@
#include <LibGUI/GFrame.h>
class GlyphMapWidget final : public GFrame {
C_OBJECT(GlyphMapWidget)
public:
GlyphMapWidget(Font&, GWidget* parent);
virtual ~GlyphMapWidget() override;
u8 selected_glyph() const { return m_selected_glyph; }
@ -25,6 +25,7 @@ public:
Function<void(u8)> on_glyph_selected;
private:
GlyphMapWidget(Font&, GWidget* parent);
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;