mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:07:44 +00:00
Userland+LibGUI: Make Margins arguments match CSS ordering
Previously the argument order for Margins was (left, top, right, bottom). To make it more familiar and closer to how CSS does it, the argument order is now (top, right, bottom, left).
This commit is contained in:
parent
c17f9adb12
commit
9c9a5c55cb
43 changed files with 78 additions and 78 deletions
|
@ -47,7 +47,7 @@ ClockWidget::ClockWidget()
|
|||
auto& root_container = m_calendar_window->set_main_widget<GUI::Label>();
|
||||
root_container.set_fill_with_background_color(true);
|
||||
root_container.set_layout<GUI::VerticalBoxLayout>();
|
||||
root_container.layout()->set_margins({ 0, 2, 0, 2 });
|
||||
root_container.layout()->set_margins({ 2, 0, 2, 0 });
|
||||
root_container.layout()->set_spacing(0);
|
||||
root_container.set_frame_thickness(2);
|
||||
root_container.set_frame_shape(Gfx::FrameShape::Container);
|
||||
|
@ -56,7 +56,7 @@ ClockWidget::ClockWidget()
|
|||
auto& navigation_container = root_container.add<GUI::Widget>();
|
||||
navigation_container.set_fixed_height(24);
|
||||
navigation_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
navigation_container.layout()->set_margins({ 2, 2, 3, 2 });
|
||||
navigation_container.layout()->set_margins({ 2, 3, 2, 2 });
|
||||
|
||||
m_prev_date = navigation_container.add<GUI::Button>();
|
||||
m_prev_date->set_button_style(Gfx::ButtonStyle::Coolbar);
|
||||
|
@ -120,7 +120,7 @@ ClockWidget::ClockWidget()
|
|||
|
||||
auto& calendar_container = root_container.add<GUI::Widget>();
|
||||
calendar_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
calendar_container.layout()->set_margins({ 4, 4, 5, 4 });
|
||||
calendar_container.layout()->set_margins({ 4, 5, 4, 4 });
|
||||
|
||||
m_calendar = calendar_container.add<GUI::Calendar>();
|
||||
m_selected_calendar_button->set_text(m_calendar->formatted_date());
|
||||
|
@ -139,7 +139,7 @@ ClockWidget::ClockWidget()
|
|||
auto& settings_container = root_container.add<GUI::Widget>();
|
||||
settings_container.set_fixed_height(24);
|
||||
settings_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
settings_container.layout()->set_margins({ 2, 2, 3, 2 });
|
||||
settings_container.layout()->set_margins({ 2, 3, 2, 2 });
|
||||
settings_container.layout()->add_spacer();
|
||||
|
||||
m_jump_to_button = settings_container.add<GUI::Button>();
|
||||
|
|
|
@ -56,7 +56,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({ 0, 12, 0, 0 });
|
||||
left_container.layout()->set_margins({ 12, 0, 0, 0 });
|
||||
|
||||
auto& icon_wrapper = left_container.add<GUI::Widget>();
|
||||
icon_wrapper.set_fixed_size(32, 48);
|
||||
|
@ -67,7 +67,7 @@ ShutdownDialog::ShutdownDialog()
|
|||
|
||||
auto& right_container = content_container.add<GUI::Widget>();
|
||||
right_container.set_layout<GUI::VerticalBoxLayout>();
|
||||
right_container.layout()->set_margins({ 0, 12, 12, 8 });
|
||||
right_container.layout()->set_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);
|
||||
|
|
|
@ -62,7 +62,7 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
|
|||
|
||||
auto& main_widget = set_main_widget<TaskbarWidget>();
|
||||
main_widget.set_layout<GUI::HorizontalBoxLayout>();
|
||||
main_widget.layout()->set_margins({ 3, 3, 1, 1 });
|
||||
main_widget.layout()->set_margins({ 3, 1, 1, 3 });
|
||||
|
||||
m_start_button = GUI::Button::construct("Serenity");
|
||||
set_start_button_font(Gfx::FontDatabase::default_font().bold_variant());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue