From 9c9a5c55cb34c63f3b6d3bf36dcbc6c37a429677 Mon Sep 17 00:00:00 2001 From: sin-ack Date: Tue, 17 Aug 2021 00:10:51 +0000 Subject: [PATCH] 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). --- Userland/Applets/Audio/main.cpp | 2 +- Userland/Applications/Assistant/main.cpp | 4 ++-- .../Applications/DisplaySettings/DesktopSettings.gml | 2 +- .../Applications/DisplaySettings/MonitorSettings.gml | 4 ++-- .../FileManager/PropertiesWindowGeneralTab.gml | 2 +- Userland/Applications/FileManager/main.cpp | 4 ++-- .../Applications/FontEditor/NewFontDialogPage2.gml | 4 ++-- Userland/Applications/IRCClient/IRCAppWindow.cpp | 2 +- Userland/Applications/KeyboardSettings/main.cpp | 2 +- .../Applications/MailSettings/MailSettingsWindow.gml | 4 ++-- .../MouseSettings/MouseSettingsWindow.gml | 6 +++--- .../Applications/PixelPaint/CreateNewGuideDialog.gml | 2 +- .../PixelPaint/LayerPropertiesWidget.cpp | 2 +- .../Applications/PixelPaint/PixelPaintWindow.gml | 2 +- .../Applications/PixelPaint/ToolPropertiesWidget.cpp | 2 +- Userland/Applications/PixelPaint/main.cpp | 2 +- Userland/Applications/Spreadsheet/CellTypeDialog.cpp | 6 +++--- Userland/Applications/Spreadsheet/csv_export.gml | 6 +++--- Userland/Applications/Spreadsheet/csv_import.gml | 8 ++++---- .../Applications/SystemMonitor/MemoryStatsWidget.cpp | 2 +- .../SystemMonitor/NetworkStatisticsWidget.cpp | 6 +++--- Userland/Applications/SystemMonitor/main.cpp | 6 +++--- .../Applications/Terminal/TerminalSettingsWindow.gml | 8 ++++---- Userland/Applications/Welcome/WelcomeWindow.gml | 2 +- .../Demos/WidgetGallery/GalleryGML/BasicsTab.gml | 6 +++--- .../Demos/WidgetGallery/GalleryGML/SlidersTab.gml | 2 +- .../HackStudio/Debugger/EvaluateExpressionDialog.cpp | 2 +- Userland/DevTools/HackStudio/EditorWrapper.cpp | 2 +- Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 +- Userland/DevTools/Profiler/main.cpp | 2 +- Userland/Games/GameOfLife/main.cpp | 2 +- Userland/Libraries/LibGUI/AboutDialog.cpp | 6 +++--- Userland/Libraries/LibGUI/ColorPicker.cpp | 2 +- Userland/Libraries/LibGUI/FilePickerDialog.gml | 2 +- Userland/Libraries/LibGUI/InputBox.cpp | 2 +- Userland/Libraries/LibGUI/Margins.h | 12 ++++++------ Userland/Libraries/LibGUI/MessageBox.cpp | 2 +- Userland/Libraries/LibGUI/ProcessChooser.cpp | 4 ++-- Userland/Libraries/LibGUI/Wizards/WizardDialog.cpp | 2 +- Userland/Libraries/LibGUI/Wizards/WizardPage.cpp | 2 +- Userland/Services/Taskbar/ClockWidget.cpp | 8 ++++---- Userland/Services/Taskbar/ShutdownDialog.cpp | 4 ++-- Userland/Services/Taskbar/TaskbarWindow.cpp | 2 +- 43 files changed, 78 insertions(+), 78 deletions(-) diff --git a/Userland/Applets/Audio/main.cpp b/Userland/Applets/Audio/main.cpp index 54c7c5bd7c3..b62dde9e910 100644 --- a/Userland/Applets/Audio/main.cpp +++ b/Userland/Applets/Audio/main.cpp @@ -63,7 +63,7 @@ public: m_root_container = m_slider_window->set_main_widget(); m_root_container->set_fill_with_background_color(true); m_root_container->set_layout(); - m_root_container->layout()->set_margins({ 0, 4, 0, 4 }); + m_root_container->layout()->set_margins({ 4, 0, 4, 0 }); m_root_container->layout()->set_spacing(0); m_root_container->set_frame_thickness(2); m_root_container->set_frame_shape(Gfx::FrameShape::Container); diff --git a/Userland/Applications/Assistant/main.cpp b/Userland/Applications/Assistant/main.cpp index da0d825b725..1d1de4bb62f 100644 --- a/Userland/Applications/Assistant/main.cpp +++ b/Userland/Applications/Assistant/main.cpp @@ -221,12 +221,12 @@ int main(int argc, char** argv) container.set_fill_with_background_color(true); container.set_frame_shadow(Gfx::FrameShadow::Raised); auto& layout = container.set_layout(); - layout.set_margins({ 8, 8, 8, 0 }); + layout.set_margins({ 8, 8, 0, 8 }); auto& text_box = container.add(); auto& results_container = container.add(); auto& results_layout = results_container.set_layout(); - results_layout.set_margins({ 0, 10, 0, 10 }); + results_layout.set_margins({ 10, 0, 10, 0 }); auto mark_selected_item = [&]() { for (size_t i = 0; i < app_state.visible_result_count; ++i) { diff --git a/Userland/Applications/DisplaySettings/DesktopSettings.gml b/Userland/Applications/DisplaySettings/DesktopSettings.gml index 0aa4154f4e2..1d753cd6cbe 100644 --- a/Userland/Applications/DisplaySettings/DesktopSettings.gml +++ b/Userland/Applications/DisplaySettings/DesktopSettings.gml @@ -7,7 +7,7 @@ @GUI::GroupBox { layout: @GUI::VerticalBoxLayout { - margins: [16, 24, 16, 6] + margins: [24, 16, 6, 16] } title: "Workspaces" diff --git a/Userland/Applications/DisplaySettings/MonitorSettings.gml b/Userland/Applications/DisplaySettings/MonitorSettings.gml index 2f545c9a473..7984e9ea911 100644 --- a/Userland/Applications/DisplaySettings/MonitorSettings.gml +++ b/Userland/Applications/DisplaySettings/MonitorSettings.gml @@ -18,7 +18,7 @@ @GUI::Widget { shrink_to_fit: true layout: @GUI::HorizontalBoxLayout { - margins: [16, 8, 8, 6] + margins: [8, 8, 6, 16] } @GUI::Label { @@ -34,7 +34,7 @@ @GUI::GroupBox { layout: @GUI::VerticalBoxLayout { - margins: [16, 24, 16, 6] + margins: [24, 16, 6, 16] } title: "Screen settings" diff --git a/Userland/Applications/FileManager/PropertiesWindowGeneralTab.gml b/Userland/Applications/FileManager/PropertiesWindowGeneralTab.gml index 449ab3a54d5..142082911cc 100644 --- a/Userland/Applications/FileManager/PropertiesWindowGeneralTab.gml +++ b/Userland/Applications/FileManager/PropertiesWindowGeneralTab.gml @@ -1,6 +1,6 @@ @GUI::Widget { layout: @GUI::VerticalBoxLayout { - margins: [12, 8, 12, 8] + margins: [8, 12, 8, 12] spacing: 10 } diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 523bed4cd25..3c37b36cc90 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -443,12 +443,12 @@ int run_in_windowed_mode(RefPtr config, String initial_locatio auto& toolbar_container = *widget.find_descendant_of_type_named("toolbar_container"); auto& main_toolbar = *widget.find_descendant_of_type_named("main_toolbar"); auto& location_toolbar = *widget.find_descendant_of_type_named("location_toolbar"); - location_toolbar.layout()->set_margins({ 6, 3, 6, 3 }); + location_toolbar.layout()->set_margins({ 3, 6, 3, 6 }); auto& location_textbox = *widget.find_descendant_of_type_named("location_textbox"); auto& breadcrumb_toolbar = *widget.find_descendant_of_type_named("breadcrumb_toolbar"); - breadcrumb_toolbar.layout()->set_margins({ 6, 0, 6, 0 }); + breadcrumb_toolbar.layout()->set_margins({ 0, 6, 0, 6 }); auto& breadcrumbbar = *widget.find_descendant_of_type_named("breadcrumbbar"); auto& splitter = *widget.find_descendant_of_type_named("splitter"); diff --git a/Userland/Applications/FontEditor/NewFontDialogPage2.gml b/Userland/Applications/FontEditor/NewFontDialogPage2.gml index e4dec5fcc3d..e9ebf286562 100644 --- a/Userland/Applications/FontEditor/NewFontDialogPage2.gml +++ b/Userland/Applications/FontEditor/NewFontDialogPage2.gml @@ -11,7 +11,7 @@ title: "Metadata" fixed_width: 200 layout: @GUI::VerticalBoxLayout { - margins: [8, 16, 8, 8] + margins: [16, 8, 8, 8] } @GUI::Widget { @@ -125,7 +125,7 @@ @GUI::Widget { name: "glyph_editor_container" layout: @GUI::VerticalBoxLayout { - margins: [0, 5, 0, 0] + margins: [5, 0, 0, 0] } } diff --git a/Userland/Applications/IRCClient/IRCAppWindow.cpp b/Userland/Applications/IRCClient/IRCAppWindow.cpp index 187e3dc2927..e24dab9d30c 100644 --- a/Userland/Applications/IRCClient/IRCAppWindow.cpp +++ b/Userland/Applications/IRCClient/IRCAppWindow.cpp @@ -298,7 +298,7 @@ void IRCAppWindow::setup_widgets() auto& outer_container = widget.add(); outer_container.set_layout(); - outer_container.layout()->set_margins({ 2, 0, 2, 2 }); + outer_container.layout()->set_margins({ 0, 2, 2, 2 }); auto& horizontal_container = outer_container.add(); diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp index 8c77b31705c..411e6b9536b 100644 --- a/Userland/Applications/KeyboardSettings/main.cpp +++ b/Userland/Applications/KeyboardSettings/main.cpp @@ -154,7 +154,7 @@ int main(int argc, char** argv) bottom_widget.set_layout(); bottom_widget.layout()->add_spacer(); bottom_widget.set_fixed_height(30); - bottom_widget.set_content_margins({ 0, 4, 0, 4 }); + bottom_widget.set_content_margins({ 4, 0, 4, 0 }); auto& ok_button = bottom_widget.add(); ok_button.set_text("OK"); diff --git a/Userland/Applications/MailSettings/MailSettingsWindow.gml b/Userland/Applications/MailSettings/MailSettingsWindow.gml index 9ab7b4ae3ce..8e6a61e3bf8 100644 --- a/Userland/Applications/MailSettings/MailSettingsWindow.gml +++ b/Userland/Applications/MailSettings/MailSettingsWindow.gml @@ -11,7 +11,7 @@ fixed_height: 170 layout: @GUI::VerticalBoxLayout { - margins: [8, 16, 8, 8] + margins: [16, 8, 8, 8] spacing: 2 } @@ -101,7 +101,7 @@ fixed_height: 110 layout: @GUI::VerticalBoxLayout { - margins: [8, 16, 8, 8] + margins: [16, 8, 8, 8] spacing: 2 } diff --git a/Userland/Applications/MouseSettings/MouseSettingsWindow.gml b/Userland/Applications/MouseSettings/MouseSettingsWindow.gml index 93e3b68949d..3731fecceb9 100644 --- a/Userland/Applications/MouseSettings/MouseSettingsWindow.gml +++ b/Userland/Applications/MouseSettings/MouseSettingsWindow.gml @@ -11,7 +11,7 @@ fixed_height: 110 layout: @GUI::VerticalBoxLayout { - margins: [8, 16, 8, 8] + margins: [16, 8, 8, 8] spacing: 2 } @@ -60,7 +60,7 @@ fixed_height: 110 layout: @GUI::VerticalBoxLayout { - margins: [8, 16, 8, 8] + margins: [16, 8, 8, 8] spacing: 2 } @@ -114,7 +114,7 @@ fixed_height: 110 layout: @GUI::VerticalBoxLayout { - margins: [8, 16, 8, 8] + margins: [16, 8, 8, 8] spacing: 2 } diff --git a/Userland/Applications/PixelPaint/CreateNewGuideDialog.gml b/Userland/Applications/PixelPaint/CreateNewGuideDialog.gml index 9dc7c5b9579..54cf57a6d82 100644 --- a/Userland/Applications/PixelPaint/CreateNewGuideDialog.gml +++ b/Userland/Applications/PixelPaint/CreateNewGuideDialog.gml @@ -14,7 +14,7 @@ shrink_to_fit: true layout: @GUI::HorizontalBoxLayout { - margins: [10,20,10,10] + margins: [20,10,10,10] } @GUI::RadioButton { diff --git a/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp b/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp index 44ef3356261..67094d65542 100644 --- a/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp +++ b/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp @@ -25,7 +25,7 @@ LayerPropertiesWidget::LayerPropertiesWidget() auto& group_box = add("Layer properties"); auto& layout = group_box.set_layout(); - layout.set_margins({ 10, 20, 10, 10 }); + layout.set_margins({ 20, 10, 10, 10 }); auto& name_container = group_box.add(); name_container.set_fixed_height(20); diff --git a/Userland/Applications/PixelPaint/PixelPaintWindow.gml b/Userland/Applications/PixelPaint/PixelPaintWindow.gml index f0b35f7363e..c008f276f87 100644 --- a/Userland/Applications/PixelPaint/PixelPaintWindow.gml +++ b/Userland/Applications/PixelPaint/PixelPaintWindow.gml @@ -51,7 +51,7 @@ @GUI::GroupBox { title: "Layers" layout: @GUI::VerticalBoxLayout { - margins: [6, 16, 6, 6] + margins: [16, 6, 6, 6] } @PixelPaint::LayerListWidget { diff --git a/Userland/Applications/PixelPaint/ToolPropertiesWidget.cpp b/Userland/Applications/PixelPaint/ToolPropertiesWidget.cpp index 3bbbe8b82a9..9e96db24b29 100644 --- a/Userland/Applications/PixelPaint/ToolPropertiesWidget.cpp +++ b/Userland/Applications/PixelPaint/ToolPropertiesWidget.cpp @@ -19,7 +19,7 @@ ToolPropertiesWidget::ToolPropertiesWidget() m_group_box = add("Tool properties"); auto& layout = m_group_box->set_layout(); - layout.set_margins({ 10, 20, 10, 10 }); + layout.set_margins({ 20, 10, 10, 10 }); m_tool_widget_stack = m_group_box->add(); m_blank_widget = m_tool_widget_stack->add(); } diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index dfa3a1ca250..7b7661b3c4d 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -101,7 +101,7 @@ int main(int argc, char** argv) auto& toolbox = *main_widget.find_descendant_of_type_named("toolbox"); auto& tab_widget = *main_widget.find_descendant_of_type_named("tab_widget"); - tab_widget.set_container_margins({ 4, 4, 5, 5 }); + tab_widget.set_container_margins({ 4, 5, 5, 4 }); tab_widget.set_close_button_enabled(true); auto& palette_widget = *main_widget.find_descendant_of_type_named("palette_widget"); diff --git a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp index 4365ba222c3..f50a7efad6c 100644 --- a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp +++ b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp @@ -199,7 +199,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, const Vector& po { auto& horizontal_alignment_selection_container = alignment_tab.add(); horizontal_alignment_selection_container.set_layout(); - horizontal_alignment_selection_container.layout()->set_margins({ 0, 4, 0, 0 }); + horizontal_alignment_selection_container.layout()->set_margins({ 4, 0, 0, 0 }); horizontal_alignment_selection_container.set_fixed_height(22); auto& horizontal_alignment_label = horizontal_alignment_selection_container.add(); @@ -273,7 +273,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, const Vector& po // FIXME: Somehow allow unsetting these. auto& foreground_container = static_formatting_container.add(); foreground_container.set_layout(); - foreground_container.layout()->set_margins({ 0, 4, 0, 0 }); + foreground_container.layout()->set_margins({ 4, 0, 0, 0 }); foreground_container.set_shrink_to_fit(true); auto& foreground_label = foreground_container.add(); @@ -293,7 +293,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, const Vector& po // FIXME: Somehow allow unsetting these. auto& background_container = static_formatting_container.add(); background_container.set_layout(); - background_container.layout()->set_margins({ 0, 4, 0, 0 }); + background_container.layout()->set_margins({ 4, 0, 0, 0 }); background_container.set_shrink_to_fit(true); auto& background_label = background_container.add(); diff --git a/Userland/Applications/Spreadsheet/csv_export.gml b/Userland/Applications/Spreadsheet/csv_export.gml index d2def8652c7..e07706b2076 100644 --- a/Userland/Applications/Spreadsheet/csv_export.gml +++ b/Userland/Applications/Spreadsheet/csv_export.gml @@ -19,7 +19,7 @@ layout: @GUI::VerticalBoxLayout { // FIXME: This is working around the fact that group boxes don't allocate space for their title and border! - margins: [10, 20, 10, 10] + margins: [20, 10, 10, 10] } @GUI::RadioButton { @@ -70,7 +70,7 @@ layout: @GUI::VerticalBoxLayout { // FIXME: This is working around the fact that group boxes don't allocate space for their title and border! - margins: [10, 20, 10, 10] + margins: [20, 10, 10, 10] } @GUI::RadioButton { @@ -152,7 +152,7 @@ layout: @GUI::VerticalBoxLayout { // FIXME: This is working around the fact that group boxes don't allocate space for their title and border! - margins: [10, 20, 10, 10] + margins: [20, 10, 10, 10] } @GUI::TextEditor { diff --git a/Userland/Applications/Spreadsheet/csv_import.gml b/Userland/Applications/Spreadsheet/csv_import.gml index be447f5fa38..eb141dcf403 100644 --- a/Userland/Applications/Spreadsheet/csv_import.gml +++ b/Userland/Applications/Spreadsheet/csv_import.gml @@ -19,7 +19,7 @@ layout: @GUI::VerticalBoxLayout { // FIXME: This is working around the fact that group boxes don't allocate space for their title and border! - margins: [10, 20, 10, 10] + margins: [20, 10, 10, 10] } @GUI::RadioButton { @@ -70,7 +70,7 @@ layout: @GUI::VerticalBoxLayout { // FIXME: This is working around the fact that group boxes don't allocate space for their title and border! - margins: [10, 20, 10, 10] + margins: [20, 10, 10, 10] } @GUI::RadioButton { @@ -133,7 +133,7 @@ fixed_height: 40 layout: @GUI::VerticalBoxLayout { - margins: [6, 6, 6, 0] + margins: [6, 6, 0, 6] } @GUI::Widget { @@ -165,7 +165,7 @@ layout: @GUI::VerticalBoxLayout { // FIXME: This is working around the fact that group boxes don't allocate space for their title and border! - margins: [10, 20, 10, 10] + margins: [20, 10, 10, 10] } @GUI::StackWidget { diff --git a/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp b/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp index 63e368ba801..4dcedb33405 100644 --- a/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp +++ b/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp @@ -31,7 +31,7 @@ MemoryStatsWidget::MemoryStatsWidget(GraphWidget& graph) set_fixed_height(110); set_layout(); - layout()->set_margins({ 0, 8, 0, 0 }); + layout()->set_margins({ 8, 0, 0, 0 }); layout()->set_spacing(3); auto build_widgets_for_label = [this](const String& description) -> RefPtr { diff --git a/Userland/Applications/SystemMonitor/NetworkStatisticsWidget.cpp b/Userland/Applications/SystemMonitor/NetworkStatisticsWidget.cpp index c27b7b6c57b..77383c831d0 100644 --- a/Userland/Applications/SystemMonitor/NetworkStatisticsWidget.cpp +++ b/Userland/Applications/SystemMonitor/NetworkStatisticsWidget.cpp @@ -32,7 +32,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget() auto& adapters_group_box = add("Adapters"); adapters_group_box.set_layout(); - adapters_group_box.layout()->set_margins({ 6, 16, 6, 6 }); + adapters_group_box.layout()->set_margins({ 16, 6, 6, 6 }); adapters_group_box.set_fixed_height(120); m_adapter_table_view = adapters_group_box.add(); @@ -69,7 +69,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget() auto& tcp_sockets_group_box = add("TCP Sockets"); tcp_sockets_group_box.set_layout(); - tcp_sockets_group_box.layout()->set_margins({ 6, 16, 6, 6 }); + tcp_sockets_group_box.layout()->set_margins({ 16, 6, 6, 6 }); m_tcp_socket_table_view = tcp_sockets_group_box.add(); @@ -90,7 +90,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget() auto& udp_sockets_group_box = add("UDP Sockets"); udp_sockets_group_box.set_layout(); - udp_sockets_group_box.layout()->set_margins({ 6, 16, 6, 6 }); + udp_sockets_group_box.layout()->set_margins({ 16, 6, 6, 6 }); m_udp_socket_table_view = udp_sockets_group_box.add(); diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 72c35b84181..496bd4d4a8e 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -179,7 +179,7 @@ int main(int argc, char** argv) auto& tabwidget_container = main_widget.add(); tabwidget_container.set_layout(); - tabwidget_container.layout()->set_margins({ 4, 0, 4, 4 }); + tabwidget_container.layout()->set_margins({ 0, 4, 4, 4 }); auto& tabwidget = tabwidget_container.add(); statusbar = main_widget.add(3); @@ -669,7 +669,7 @@ NonnullRefPtr build_graphs_tab() auto& cpu_graph_group_box = graphs_container->add("CPU usage"); cpu_graph_group_box.set_layout(); - cpu_graph_group_box.layout()->set_margins({ 6, 16, 6, 6 }); + cpu_graph_group_box.layout()->set_margins({ 16, 6, 6, 6 }); cpu_graph_group_box.set_fixed_height(120); Vector cpu_graphs; for (size_t i = 0; i < ProcessModel::the().cpus().size(); i++) { @@ -701,7 +701,7 @@ NonnullRefPtr build_graphs_tab() auto& memory_graph_group_box = graphs_container->add("Memory usage"); memory_graph_group_box.set_layout(); - memory_graph_group_box.layout()->set_margins({ 6, 16, 6, 6 }); + memory_graph_group_box.layout()->set_margins({ 16, 6, 6, 6 }); memory_graph_group_box.set_fixed_height(120); auto& memory_graph = memory_graph_group_box.add(); memory_graph.set_stack_values(true); diff --git a/Userland/Applications/Terminal/TerminalSettingsWindow.gml b/Userland/Applications/Terminal/TerminalSettingsWindow.gml index 6c906fd463d..575257215b4 100644 --- a/Userland/Applications/Terminal/TerminalSettingsWindow.gml +++ b/Userland/Applications/Terminal/TerminalSettingsWindow.gml @@ -10,7 +10,7 @@ shrink_to_fit: true layout: @GUI::VerticalBoxLayout { - margins: [6, 16, 6, 6] + margins: [16, 6, 6, 6] } @GUI::RadioButton { @@ -34,7 +34,7 @@ shrink_to_fit: true layout: @GUI::VerticalBoxLayout { - margins: [6, 16, 6, 6] + margins: [16, 6, 6, 6] } @GUI::OpacitySlider { @@ -50,7 +50,7 @@ shrink_to_fit: true layout: @GUI::VerticalBoxLayout { - margins: [6, 16, 6, 6] + margins: [16, 6, 6, 6] } @GUI::SpinBox { @@ -66,7 +66,7 @@ shrink_to_fit: true layout: @GUI::VerticalBoxLayout { - margins: [6, 16, 6, 6] + margins: [16, 6, 6, 6] } @GUI::ComboBox { diff --git a/Userland/Applications/Welcome/WelcomeWindow.gml b/Userland/Applications/Welcome/WelcomeWindow.gml index 8e38cf84017..bf3ef46c71d 100644 --- a/Userland/Applications/Welcome/WelcomeWindow.gml +++ b/Userland/Applications/Welcome/WelcomeWindow.gml @@ -17,7 +17,7 @@ min_width: 340 min_height: 160 layout: @GUI::HorizontalBoxLayout { - margins: [0, 0, 16, 0] + margins: [0, 16, 0, 0] } @GUI::Widget { diff --git a/Userland/Demos/WidgetGallery/GalleryGML/BasicsTab.gml b/Userland/Demos/WidgetGallery/GalleryGML/BasicsTab.gml index 0d3bcf245dc..77ead7ffb51 100644 --- a/Userland/Demos/WidgetGallery/GalleryGML/BasicsTab.gml +++ b/Userland/Demos/WidgetGallery/GalleryGML/BasicsTab.gml @@ -20,7 +20,7 @@ shadow: "Sunken" thickness: 1 layout: @GUI::VerticalBoxLayout { - margins: [4, 3, 4, 3] + margins: [3, 4, 3, 4] } @GUI::Label { @@ -37,7 +37,7 @@ @GUI::Widget { layout: @GUI::VerticalBoxLayout { - margins: [4, 0, 4, 0] + margins: [0, 4, 0, 4] } @GUI::Label { @@ -85,7 +85,7 @@ @GUI::Widget { fixed_height: 125 layout: @GUI::VerticalBoxLayout { - margins: [8, 3, 8, 3] + margins: [3, 8, 3, 8] } @GUI::Widget { diff --git a/Userland/Demos/WidgetGallery/GalleryGML/SlidersTab.gml b/Userland/Demos/WidgetGallery/GalleryGML/SlidersTab.gml index 982c4ca660b..cd02de5986e 100644 --- a/Userland/Demos/WidgetGallery/GalleryGML/SlidersTab.gml +++ b/Userland/Demos/WidgetGallery/GalleryGML/SlidersTab.gml @@ -36,7 +36,7 @@ @GUI::Widget { fixed_height: 88 layout: @GUI::VerticalBoxLayout { - margins: [8, 0, 8, 0] + margins: [0, 8, 0, 8] } @GUI::Widget { diff --git a/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp b/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp index b0ec0e7f336..49adb190bf6 100644 --- a/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp +++ b/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp @@ -77,7 +77,7 @@ void EvaluateExpressionDialog::build(Window* parent_window) auto& button_container_inner = button_container_outer.add(); button_container_inner.set_layout(); button_container_inner.layout()->set_spacing(6); - button_container_inner.layout()->set_margins({ 4, 4, 0, 4 }); + button_container_inner.layout()->set_margins({ 4, 0, 4, 4 }); button_container_inner.layout()->add_spacer(); m_evaluate_button = button_container_inner.add(); diff --git a/Userland/DevTools/HackStudio/EditorWrapper.cpp b/Userland/DevTools/HackStudio/EditorWrapper.cpp index 0a010f8bee3..924be3a92f4 100644 --- a/Userland/DevTools/HackStudio/EditorWrapper.cpp +++ b/Userland/DevTools/HackStudio/EditorWrapper.cpp @@ -24,7 +24,7 @@ EditorWrapper::EditorWrapper() label_wrapper.set_fixed_height(14); label_wrapper.set_fill_with_background_color(true); label_wrapper.set_layout(); - label_wrapper.layout()->set_margins({ 2, 0, 2, 0 }); + label_wrapper.layout()->set_margins({ 0, 2, 0, 2 }); m_filename_label = label_wrapper.add("(Untitled)"); m_filename_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index a06b07cc9f1..d77bc7c2079 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -107,7 +107,7 @@ HackStudioWidget::HackStudioWidget(const String& path_to_project) m_editors_splitter = m_right_hand_stack->add(); m_editors_splitter->layout()->set_spacing(5); - m_editors_splitter->layout()->set_margins({ 0, 3, 0, 0 }); + m_editors_splitter->layout()->set_margins({ 3, 0, 0, 0 }); add_new_editor(*m_editors_splitter); m_switch_to_next_editor = create_switch_to_next_editor_action(); diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp index e3de2f2bcc4..b563541be64 100644 --- a/Userland/DevTools/Profiler/main.cpp +++ b/Userland/DevTools/Profiler/main.cpp @@ -262,7 +262,7 @@ static bool prompt_to_stop_profiling(pid_t pid, const String& process_name) auto& widget = window->set_main_widget(); widget.set_fill_with_background_color(true); auto& layout = widget.set_layout(); - layout.set_margins(GUI::Margins(0, 0, 0, 16)); + layout.set_margins({ 0, 0, 16, 0 }); auto& timer_label = widget.add("..."); Core::ElapsedTimer clock; diff --git a/Userland/Games/GameOfLife/main.cpp b/Userland/Games/GameOfLife/main.cpp index e24660a70d8..9bc8705f11c 100644 --- a/Userland/Games/GameOfLife/main.cpp +++ b/Userland/Games/GameOfLife/main.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv) main_widget.set_fill_with_background_color(true); auto& main_toolbar = *main_widget.find_descendant_of_type_named("toolbar"); - main_toolbar.layout()->set_margins({ 6, 0, 6, 0 }); + main_toolbar.layout()->set_margins({ 0, 6, 0, 6 }); auto& board_widget_container = *main_widget.find_descendant_of_type_named("board_widget_container"); auto& board_layout = board_widget_container.set_layout(); diff --git a/Userland/Libraries/LibGUI/AboutDialog.cpp b/Userland/Libraries/LibGUI/AboutDialog.cpp index 09d01d45b03..ef2c855e5b4 100644 --- a/Userland/Libraries/LibGUI/AboutDialog.cpp +++ b/Userland/Libraries/LibGUI/AboutDialog.cpp @@ -43,7 +43,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window auto& left_container = content_container.add(); left_container.set_fixed_width(60); left_container.set_layout(); - left_container.layout()->set_margins({ 0, 12, 0, 0 }); + left_container.layout()->set_margins({ 12, 0, 0, 0 }); if (icon) { auto& icon_wrapper = left_container.add(); @@ -56,13 +56,13 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window auto& right_container = content_container.add(); right_container.set_layout(); - right_container.layout()->set_margins({ 0, 12, 4, 4 }); + right_container.layout()->set_margins({ 12, 4, 4, 0 }); auto make_label = [&](const StringView& text, bool bold = false) { auto& label = right_container.add