1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibGUI: Convert GWidget to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 17:05:35 +02:00
parent e4e92980a1
commit ff6ce422dd
41 changed files with 115 additions and 107 deletions

View file

@ -75,7 +75,7 @@ void DisplayPropertiesWidget::create_resolution_list()
void DisplayPropertiesWidget::create_root_widget()
{
m_root_widget = new GWidget;
m_root_widget = GWidget::construct();
m_root_widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
m_root_widget->set_fill_with_background_color(true);
m_root_widget->layout()->set_margins({ 4, 4, 4, 16 });
@ -97,7 +97,7 @@ void DisplayPropertiesWidget::create_frame()
auto background_splitter = GSplitter::construct(Orientation::Vertical, nullptr);
tab_widget->add_widget("Wallpaper", background_splitter);
auto* background_content = new GWidget(background_splitter);
auto background_content = GWidget::construct(background_splitter);
background_content->set_layout(make<GBoxLayout>(Orientation::Vertical));
background_content->layout()->set_margins({ 4, 4, 4, 4 });
@ -120,7 +120,7 @@ void DisplayPropertiesWidget::create_frame()
auto settings_splitter = GSplitter::construct(Orientation::Vertical, nullptr);
tab_widget->add_widget("Settings", settings_splitter);
auto* settings_content = new GWidget(settings_splitter);
auto settings_content = GWidget::construct(settings_splitter);
settings_content->set_layout(make<GBoxLayout>(Orientation::Vertical));
settings_content->layout()->set_margins({ 4, 4, 4, 4 });
@ -135,7 +135,7 @@ void DisplayPropertiesWidget::create_frame()
settings_content->layout()->add_spacer();
// Add the apply and cancel buttons
auto* bottom_widget = new GWidget(m_root_widget);
auto bottom_widget = GWidget::construct(m_root_widget);
bottom_widget->set_layout(make<GBoxLayout>(Orientation::Horizontal));
bottom_widget->layout()->add_spacer();
bottom_widget->set_size_policy(Orientation::Vertical, SizePolicy::Fixed);