mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibGUI: Convert GFrame to ObjectPtr
This commit is contained in:
parent
7b5342b2e3
commit
55a6e4ac0b
7 changed files with 21 additions and 17 deletions
|
@ -192,7 +192,7 @@ GFilePicker::GFilePicker(Mode mode, const StringView& file_name, const StringVie
|
|||
}
|
||||
};
|
||||
|
||||
auto* preview_container = new GFrame(horizontal_container);
|
||||
auto preview_container = GFrame::construct(horizontal_container);
|
||||
preview_container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
preview_container->set_preferred_size(180, 0);
|
||||
preview_container->set_frame_shape(FrameShape::Container);
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
class GFrame : public GWidget {
|
||||
C_OBJECT(GFrame)
|
||||
public:
|
||||
explicit GFrame(GWidget* parent = nullptr);
|
||||
virtual ~GFrame() override;
|
||||
|
||||
int frame_thickness() const { return m_thickness; }
|
||||
|
@ -22,6 +21,7 @@ public:
|
|||
Rect frame_inner_rect() const { return frame_inner_rect_for_size(size()); }
|
||||
|
||||
protected:
|
||||
explicit GFrame(GWidget* parent = nullptr);
|
||||
void paint_event(GPaintEvent&) override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue