summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GFilePicker.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-21 14:19:05 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-21 15:25:08 +0200
commitc7437f9caa5485d99e0101bfac98d968e767741f (patch)
tree0268e791f6d419da644eca6fc6789e5429c10848 /Libraries/LibGUI/GFilePicker.cpp
parent6b347747f2f912721bc076fcd4aabb8a4bfa9e98 (diff)
downloadserenity-c7437f9caa5485d99e0101bfac98d968e767741f.zip
LibGUI: Convert GLabel to ObjectPtr
Diffstat (limited to 'Libraries/LibGUI/GFilePicker.cpp')
-rw-r--r--Libraries/LibGUI/GFilePicker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibGUI/GFilePicker.cpp b/Libraries/LibGUI/GFilePicker.cpp
index e15b549d1f..f827f1aa2c 100644
--- a/Libraries/LibGUI/GFilePicker.cpp
+++ b/Libraries/LibGUI/GFilePicker.cpp
@@ -128,7 +128,7 @@ GFilePicker::GFilePicker(Mode mode, const StringView& file_name, const StringVie
filename_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
filename_container->set_preferred_size(0, 20);
filename_container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
- auto* filename_label = new GLabel("File name:", filename_container);
+ auto filename_label = GLabel::construct("File name:", filename_container);
filename_label->set_text_alignment(TextAlignment::CenterLeft);
filename_label->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
filename_label->set_preferred_size(60, 0);
@@ -201,17 +201,17 @@ GFilePicker::GFilePicker(Mode mode, const StringView& file_name, const StringVie
preview_container->set_layout(make<GBoxLayout>(Orientation::Vertical));
preview_container->layout()->set_margins({ 8, 8, 8, 8 });
- m_preview_image_label = new GLabel(preview_container);
+ m_preview_image_label = GLabel::construct(preview_container);
m_preview_image_label->set_should_stretch_icon(true);
m_preview_image_label->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
m_preview_image_label->set_preferred_size(160, 160);
- m_preview_name_label = new GLabel(preview_container);
+ m_preview_name_label = GLabel::construct(preview_container);
m_preview_name_label->set_font(Font::default_bold_font());
m_preview_name_label->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
m_preview_name_label->set_preferred_size(0, m_preview_name_label->font().glyph_height());
- m_preview_geometry_label = new GLabel(preview_container);
+ m_preview_geometry_label = GLabel::construct(preview_container);
m_preview_geometry_label->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
m_preview_geometry_label->set_preferred_size(0, m_preview_name_label->font().glyph_height());
}