mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibGUI: Use set_layout<LayoutType>() in lots of client code
This commit is contained in:
@@ -97,7 +97,7 @@ void MessageBox::build()
|
||||
int text_width = widget->font().width(m_text);
|
||||
int icon_width = 0;
|
||||
|
||||
widget->set_layout(make<VerticalBoxLayout>());
|
||||
widget->set_layout<VerticalBoxLayout>();
|
||||
widget->set_fill_with_background_color(true);
|
||||
|
||||
widget->layout()->set_margins({ 0, 15, 0, 15 });
|
||||
@@ -106,7 +106,7 @@ void MessageBox::build()
|
||||
RefPtr<Widget> message_container = widget;
|
||||
if (m_type != Type::None) {
|
||||
message_container = widget->add<Widget>();
|
||||
message_container->set_layout(make<HorizontalBoxLayout>());
|
||||
message_container->set_layout<HorizontalBoxLayout>();
|
||||
message_container->layout()->set_margins({ 8, 0, 8, 0 });
|
||||
message_container->layout()->set_spacing(8);
|
||||
|
||||
@@ -122,7 +122,7 @@ void MessageBox::build()
|
||||
label->set_preferred_size(text_width, 16);
|
||||
|
||||
auto button_container = widget->add<Widget>();
|
||||
button_container->set_layout(make<HorizontalBoxLayout>());
|
||||
button_container->set_layout<HorizontalBoxLayout>();
|
||||
button_container->layout()->set_spacing(5);
|
||||
button_container->layout()->set_margins({ 15, 0, 15, 0 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user