mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Userland: Specify margins and spacing in the GUI::Layout constructor
This commit is contained in:
@@ -33,9 +33,8 @@ AddEventDialog::AddEventDialog(Core::DateTime date_time, Window* parent_window)
|
||||
widget->set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
auto& top_container = widget->add<GUI::Widget>();
|
||||
top_container.set_layout<GUI::VerticalBoxLayout>();
|
||||
top_container.set_layout<GUI::VerticalBoxLayout>(4);
|
||||
top_container.set_fixed_height(45);
|
||||
top_container.layout()->set_margins(4);
|
||||
|
||||
auto& add_label = top_container.add<GUI::Label>("Add title & date:");
|
||||
add_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
@@ -46,14 +45,12 @@ AddEventDialog::AddEventDialog(Core::DateTime date_time, Window* parent_window)
|
||||
event_title_textbox.set_fixed_height(20);
|
||||
|
||||
auto& middle_container = widget->add<GUI::Widget>();
|
||||
middle_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
middle_container.set_layout<GUI::HorizontalBoxLayout>(4);
|
||||
middle_container.set_fixed_height(25);
|
||||
middle_container.layout()->set_margins(4);
|
||||
|
||||
auto& time_container = widget->add<GUI::Widget>();
|
||||
time_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
time_container.set_layout<GUI::HorizontalBoxLayout>(4);
|
||||
time_container.set_fixed_height(25);
|
||||
time_container.layout()->set_margins(4);
|
||||
|
||||
auto& starting_month_combo = middle_container.add<GUI::ComboBox>();
|
||||
starting_month_combo.set_only_allow_values_from_model(true);
|
||||
|
||||
Reference in New Issue
Block a user