summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar/ShutdownDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/Taskbar/ShutdownDialog.cpp')
-rw-r--r--Userland/Services/Taskbar/ShutdownDialog.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/Userland/Services/Taskbar/ShutdownDialog.cpp b/Userland/Services/Taskbar/ShutdownDialog.cpp
index 5cc972af29..c936d16863 100644
--- a/Userland/Services/Taskbar/ShutdownDialog.cpp
+++ b/Userland/Services/Taskbar/ShutdownDialog.cpp
@@ -44,8 +44,7 @@ ShutdownDialog::ShutdownDialog()
{
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
widget->set_fill_with_background_color(true);
- widget->set_layout<GUI::VerticalBoxLayout>();
- widget->layout()->set_spacing(0);
+ widget->set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0);
auto& banner_image = widget->add<GUI::ImageWidget>();
banner_image.load_from_file("/res/graphics/brand-banner.png"sv);
@@ -55,8 +54,7 @@ ShutdownDialog::ShutdownDialog()
auto& left_container = content_container.add<GUI::Widget>();
left_container.set_fixed_width(60);
- left_container.set_layout<GUI::VerticalBoxLayout>();
- left_container.layout()->set_margins({ 12, 0, 0 });
+ left_container.set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 12, 0, 0 });
auto& icon_wrapper = left_container.add<GUI::Widget>();
icon_wrapper.set_fixed_size(32, 48);
@@ -66,8 +64,7 @@ ShutdownDialog::ShutdownDialog()
icon_image.set_bitmap(Gfx::Bitmap::load_from_file("/res/icons/32x32/shutdown.png"sv).release_value_but_fixme_should_propagate_errors());
auto& right_container = content_container.add<GUI::Widget>();
- right_container.set_layout<GUI::VerticalBoxLayout>();
- right_container.layout()->set_margins({ 12, 12, 8, 0 });
+ right_container.set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 12, 12, 8, 0 });
auto& label = right_container.add<GUI::Label>("What would you like to do?");
label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
@@ -90,12 +87,11 @@ ShutdownDialog::ShutdownDialog()
}
}
- right_container.layout()->add_spacer();
+ right_container.add_spacer().release_value_but_fixme_should_propagate_errors();
auto& button_container = right_container.add<GUI::Widget>();
button_container.set_fixed_height(23);
- button_container.set_layout<GUI::HorizontalBoxLayout>();
- button_container.layout()->set_spacing(5);
+ button_container.set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 5);
button_container.add_spacer().release_value_but_fixme_should_propagate_errors();
auto& ok_button = button_container.add<GUI::Button>(String::from_utf8_short_string("OK"sv));
ok_button.set_fixed_size(80, 23);