mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Userland: Specify margins and spacing in the GUI::Layout constructor
This commit is contained in:
parent
9561ec15f4
commit
77ad0fdb07
64 changed files with 136 additions and 288 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue