summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Applications/Browser/InspectorWidget.cpp2
-rw-r--r--Applications/DisplayProperties/DisplayProperties.cpp8
-rw-r--r--Applications/FileManager/PropertiesDialog.cpp10
-rw-r--r--Applications/HexEditor/HexEditorWidget.cpp2
-rw-r--r--Applications/IRCClient/IRCAppWindow.cpp4
-rw-r--r--Applications/IRCClient/IRCWindow.cpp2
-rw-r--r--Applications/PaintBrush/PaletteWidget.cpp6
-rw-r--r--Applications/PaintBrush/ToolboxWidget.cpp2
-rw-r--r--Applications/PaintBrush/main.cpp4
-rw-r--r--Applications/Piano/KnobsWidget.cpp8
-rw-r--r--Applications/Piano/MainWidget.cpp4
-rw-r--r--Applications/Piano/SamplerWidget.cpp4
-rw-r--r--Applications/SoundPlayer/SoundPlayerWidget.cpp8
-rw-r--r--Applications/SystemMenu/PowerDialog.cpp4
-rw-r--r--Applications/SystemMonitor/MemoryStatsWidget.cpp4
-rw-r--r--Applications/SystemMonitor/NetworkStatisticsWidget.cpp6
-rw-r--r--Applications/SystemMonitor/ProcessFileDescriptorMapWidget.cpp2
-rw-r--r--Applications/SystemMonitor/ProcessMemoryMapWidget.cpp2
-rw-r--r--Applications/SystemMonitor/ProcessStacksWidget.cpp2
-rw-r--r--Applications/SystemMonitor/ProcessUnveiledPathsWidget.cpp2
-rw-r--r--Applications/SystemMonitor/main.cpp16
-rw-r--r--Applications/Taskbar/TaskbarWindow.cpp4
-rw-r--r--Applications/Terminal/main.cpp6
-rw-r--r--Applications/TextEditor/TextEditorWidget.cpp8
-rw-r--r--Applications/Welcome/main.cpp10
-rw-r--r--Demos/WidgetGallery/main.cpp4
-rw-r--r--DevTools/HackStudio/EditorWrapper.cpp4
-rw-r--r--DevTools/HackStudio/FindInFilesWidget.cpp2
-rw-r--r--DevTools/HackStudio/Locator.cpp2
-rw-r--r--DevTools/HackStudio/ProcessStateWidget.cpp2
-rw-r--r--DevTools/HackStudio/TerminalWrapper.cpp2
-rw-r--r--DevTools/HackStudio/main.cpp8
-rw-r--r--DevTools/Inspector/main.cpp2
-rw-r--r--DevTools/ProfileViewer/main.cpp2
-rw-r--r--DevTools/VisualBuilder/VBForm.cpp4
-rw-r--r--DevTools/VisualBuilder/VBPropertiesWindow.cpp2
-rw-r--r--DevTools/VisualBuilder/main.cpp2
-rw-r--r--Games/Minesweeper/main.cpp4
-rw-r--r--Libraries/LibGUI/AboutDialog.cpp8
-rw-r--r--Libraries/LibGUI/ColorPicker.cpp6
-rw-r--r--Libraries/LibGUI/FilePicker.cpp14
-rw-r--r--Libraries/LibGUI/InputBox.cpp6
-rw-r--r--Libraries/LibGUI/MessageBox.cpp6
-rw-r--r--Libraries/LibGUI/StatusBar.cpp2
-rw-r--r--Servers/NotificationServer/NotificationWindow.cpp6
45 files changed, 109 insertions, 109 deletions
diff --git a/Applications/Browser/InspectorWidget.cpp b/Applications/Browser/InspectorWidget.cpp
index cf8416e417..b7d8318988 100644
--- a/Applications/Browser/InspectorWidget.cpp
+++ b/Applications/Browser/InspectorWidget.cpp
@@ -37,7 +37,7 @@
InspectorWidget::InspectorWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
auto splitter = add<GUI::VerticalSplitter>();
m_dom_tree_view = splitter->add<GUI::TreeView>();
m_dom_tree_view->on_selection = [this](auto& index) {
diff --git a/Applications/DisplayProperties/DisplayProperties.cpp b/Applications/DisplayProperties/DisplayProperties.cpp
index e84e18135a..92d91b5601 100644
--- a/Applications/DisplayProperties/DisplayProperties.cpp
+++ b/Applications/DisplayProperties/DisplayProperties.cpp
@@ -103,7 +103,7 @@ void DisplayPropertiesWidget::create_resolution_list()
void DisplayPropertiesWidget::create_root_widget()
{
m_root_widget = GUI::Widget::construct();
- m_root_widget->set_layout(make<GUI::VerticalBoxLayout>());
+ m_root_widget->set_layout<GUI::VerticalBoxLayout>();
m_root_widget->set_fill_with_background_color(true);
m_root_widget->layout()->set_margins({ 4, 4, 4, 16 });
}
@@ -130,7 +130,7 @@ void DisplayPropertiesWidget::create_frame()
auto wallpaper_splitter = tab_widget->add_tab<GUI::VerticalSplitter>("Wallpaper");
auto wallpaper_content = wallpaper_splitter->add<GUI::Widget>();
- wallpaper_content->set_layout(make<GUI::VerticalBoxLayout>());
+ wallpaper_content->set_layout<GUI::VerticalBoxLayout>();
wallpaper_content->layout()->set_margins({ 4, 4, 4, 4 });
m_wallpaper_preview = wallpaper_splitter->add<GUI::Label>();
@@ -160,7 +160,7 @@ void DisplayPropertiesWidget::create_frame()
auto settings_splitter = tab_widget->add_tab<GUI::VerticalSplitter>("Settings");
auto settings_content = settings_splitter->add<GUI::Widget>();
- settings_content->set_layout(make<GUI::VerticalBoxLayout>());
+ settings_content->set_layout<GUI::VerticalBoxLayout>();
settings_content->layout()->set_margins({ 4, 4, 4, 4 });
auto resolution_list = settings_content->add<GUI::ListView>();
@@ -183,7 +183,7 @@ void DisplayPropertiesWidget::create_frame()
// Add the apply and cancel buttons
auto bottom_widget = m_root_widget->add<GUI::Widget>();
- bottom_widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ bottom_widget->set_layout<GUI::HorizontalBoxLayout>();
bottom_widget->layout()->add_spacer();
bottom_widget->set_size_policy(Orientation::Vertical, GUI::SizePolicy::Fixed);
bottom_widget->set_preferred_size(1, 22);
diff --git a/Applications/FileManager/PropertiesDialog.cpp b/Applications/FileManager/PropertiesDialog.cpp
index 3561de5e08..4b920f5c4b 100644
--- a/Applications/FileManager/PropertiesDialog.cpp
+++ b/Applications/FileManager/PropertiesDialog.cpp
@@ -44,7 +44,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
ASSERT(file_path.is_valid());
auto& main_widget = set_main_widget<GUI::Widget>();
- main_widget.set_layout(make<GUI::VerticalBoxLayout>());
+ main_widget.set_layout<GUI::VerticalBoxLayout>();
main_widget.layout()->set_margins({ 4, 4, 4, 4 });
main_widget.set_fill_with_background_color(true);
@@ -54,14 +54,14 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
auto tab_widget = main_widget.add<GUI::TabWidget>();
auto general_tab = tab_widget->add_tab<GUI::Widget>("General");
- general_tab->set_layout(make<GUI::VerticalBoxLayout>());
+ general_tab->set_layout<GUI::VerticalBoxLayout>();
general_tab->layout()->set_margins({ 12, 8, 12, 8 });
general_tab->layout()->set_spacing(10);
general_tab->layout()->add_spacer();
auto file_container = general_tab->add<GUI::Widget>();
- file_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ file_container->set_layout<GUI::HorizontalBoxLayout>();
file_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
file_container->layout()->set_spacing(20);
file_container->set_preferred_size(0, 34);
@@ -216,7 +216,7 @@ bool PropertiesDialog::apply_changes()
void PropertiesDialog::make_permission_checkboxes(NonnullRefPtr<GUI::Widget>& parent, PermissionMasks masks, String label_string, mode_t mode)
{
auto widget = parent->add<GUI::Widget>();
- widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ widget->set_layout<GUI::HorizontalBoxLayout>();
widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
widget->set_preferred_size(0, 16);
widget->layout()->set_spacing(10);
@@ -245,7 +245,7 @@ void PropertiesDialog::make_property_value_pairs(const Vector<PropertyValuePair>
property_labels.ensure_capacity(pairs.size());
for (auto pair : pairs) {
auto label_container = parent->add<GUI::Widget>();
- label_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ label_container->set_layout<GUI::HorizontalBoxLayout>();
label_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
label_container->set_preferred_size(0, 14);
label_container->layout()->set_spacing(12);
diff --git a/Applications/HexEditor/HexEditorWidget.cpp b/Applications/HexEditor/HexEditorWidget.cpp
index 17ac674b09..a03da9a106 100644
--- a/Applications/HexEditor/HexEditorWidget.cpp
+++ b/Applications/HexEditor/HexEditorWidget.cpp
@@ -46,7 +46,7 @@
HexEditorWidget::HexEditorWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_spacing(0);
m_editor = add<HexEditor>();
diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp
index 0993d3ab9a..e1ebe4d0b7 100644
--- a/Applications/IRCClient/IRCAppWindow.cpp
+++ b/Applications/IRCClient/IRCAppWindow.cpp
@@ -182,7 +182,7 @@ void IRCAppWindow::setup_widgets()
auto widget = GUI::Widget::construct();
set_main_widget(widget);
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->set_layout<GUI::VerticalBoxLayout>();
widget->layout()->set_spacing(0);
auto toolbar = widget->add<GUI::ToolBar>();
@@ -197,7 +197,7 @@ void IRCAppWindow::setup_widgets()
toolbar->add_action(*m_close_query_action);
auto outer_container = widget->add<GUI::Widget>();
- outer_container->set_layout(make<GUI::VerticalBoxLayout>());
+ outer_container->set_layout<GUI::VerticalBoxLayout>();
outer_container->layout()->set_margins({ 2, 0, 2, 2 });
auto horizontal_container = outer_container->add<GUI::HorizontalSplitter>();
diff --git a/Applications/IRCClient/IRCWindow.cpp b/Applications/IRCClient/IRCWindow.cpp
index e151bea4af..9ad9739e5d 100644
--- a/Applications/IRCClient/IRCWindow.cpp
+++ b/Applications/IRCClient/IRCWindow.cpp
@@ -41,7 +41,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
, m_type(type)
, m_name(name)
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
// Make a container for the log buffer view + (optional) member list.
auto container = add<GUI::HorizontalSplitter>();
diff --git a/Applications/PaintBrush/PaletteWidget.cpp b/Applications/PaintBrush/PaletteWidget.cpp
index fb6bcb077c..6305199aa0 100644
--- a/Applications/PaintBrush/PaletteWidget.cpp
+++ b/Applications/PaintBrush/PaletteWidget.cpp
@@ -101,15 +101,15 @@ PaletteWidget::PaletteWidget(PaintableWidget& paintable_widget)
auto color_container = add<GUI::Widget>();
color_container->set_relative_rect(m_secondary_color_widget->relative_rect().right() + 2, 2, 500, 32);
- color_container->set_layout(make<GUI::VerticalBoxLayout>());
+ color_container->set_layout<GUI::VerticalBoxLayout>();
color_container->layout()->set_spacing(1);
auto top_color_container = color_container->add<GUI::Widget>();
- top_color_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ top_color_container->set_layout<GUI::HorizontalBoxLayout>();
top_color_container->layout()->set_spacing(1);
auto bottom_color_container = color_container->add<GUI::Widget>();
- bottom_color_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ bottom_color_container->set_layout<GUI::HorizontalBoxLayout>();
bottom_color_container->layout()->set_spacing(1);
auto add_color_widget = [&](GUI::Widget* container, Color color) {
diff --git a/Applications/PaintBrush/ToolboxWidget.cpp b/Applications/PaintBrush/ToolboxWidget.cpp
index 7c60e6cbad..23f886f80e 100644
--- a/Applications/PaintBrush/ToolboxWidget.cpp
+++ b/Applications/PaintBrush/ToolboxWidget.cpp
@@ -70,7 +70,7 @@ ToolboxWidget::ToolboxWidget()
set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
set_preferred_size(48, 0);
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
auto add_tool = [&](const StringView& name, const StringView& icon_name, OwnPtr<Tool>&& tool) {
diff --git a/Applications/PaintBrush/main.cpp b/Applications/PaintBrush/main.cpp
index aaf1573d84..6e9b241db0 100644
--- a/Applications/PaintBrush/main.cpp
+++ b/Applications/PaintBrush/main.cpp
@@ -60,13 +60,13 @@ int main(int argc, char** argv)
auto horizontal_container = GUI::Widget::construct();
window->set_main_widget(horizontal_container);
- horizontal_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ horizontal_container->set_layout<GUI::HorizontalBoxLayout>();
horizontal_container->layout()->set_spacing(0);
horizontal_container->add<ToolboxWidget>();
auto vertical_container = horizontal_container->add<GUI::Widget>();
- vertical_container->set_layout(make<GUI::VerticalBoxLayout>());
+ vertical_container->set_layout<GUI::VerticalBoxLayout>();
vertical_container->layout()->set_spacing(0);
auto paintable_widget = vertical_container->add<PaintableWidget>();
diff --git a/Applications/Piano/KnobsWidget.cpp b/Applications/Piano/KnobsWidget.cpp
index 5fc10c4fb3..2ab8f28720 100644
--- a/Applications/Piano/KnobsWidget.cpp
+++ b/Applications/Piano/KnobsWidget.cpp
@@ -36,11 +36,11 @@ KnobsWidget::KnobsWidget(AudioEngine& audio_engine, MainWidget& main_widget)
: m_audio_engine(audio_engine)
, m_main_widget(main_widget)
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
set_fill_with_background_color(true);
m_labels_container = add<GUI::Widget>();
- m_labels_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_labels_container->set_layout<GUI::HorizontalBoxLayout>();
m_labels_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_labels_container->set_preferred_size(0, 20);
@@ -53,7 +53,7 @@ KnobsWidget::KnobsWidget(AudioEngine& audio_engine, MainWidget& main_widget)
m_delay_label = m_labels_container->add<GUI::Label>("Delay");
m_values_container = add<GUI::Widget>();
- m_values_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_values_container->set_layout<GUI::HorizontalBoxLayout>();
m_values_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_values_container->set_preferred_size(0, 10);
@@ -66,7 +66,7 @@ KnobsWidget::KnobsWidget(AudioEngine& audio_engine, MainWidget& main_widget)
m_delay_value = m_values_container->add<GUI::Label>(String::number(m_audio_engine.delay()));
m_knobs_container = add<GUI::Widget>();
- m_knobs_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_knobs_container->set_layout<GUI::HorizontalBoxLayout>();
// FIXME: Implement vertical flipping in GSlider, not here.
diff --git a/Applications/Piano/MainWidget.cpp b/Applications/Piano/MainWidget.cpp
index 6010a51fe4..ccfdb35e33 100644
--- a/Applications/Piano/MainWidget.cpp
+++ b/Applications/Piano/MainWidget.cpp
@@ -38,7 +38,7 @@
MainWidget::MainWidget(AudioEngine& audio_engine)
: m_audio_engine(audio_engine)
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_spacing(2);
layout()->set_margins({ 2, 2, 2, 2 });
set_fill_with_background_color(true);
@@ -56,7 +56,7 @@ MainWidget::MainWidget(AudioEngine& audio_engine)
m_tab_widget->add_tab<SamplerWidget>("Sampler", audio_engine);
m_keys_and_knobs_container = add<GUI::Widget>();
- m_keys_and_knobs_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_keys_and_knobs_container->set_layout<GUI::HorizontalBoxLayout>();
m_keys_and_knobs_container->layout()->set_spacing(2);
m_keys_and_knobs_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_keys_and_knobs_container->set_preferred_size(0, 100);
diff --git a/Applications/Piano/SamplerWidget.cpp b/Applications/Piano/SamplerWidget.cpp
index d4903878ca..61b92fd52b 100644
--- a/Applications/Piano/SamplerWidget.cpp
+++ b/Applications/Piano/SamplerWidget.cpp
@@ -91,13 +91,13 @@ void WaveEditor::paint_event(GUI::PaintEvent& event)
SamplerWidget::SamplerWidget(AudioEngine& audio_engine)
: m_audio_engine(audio_engine)
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 10, 10, 10, 10 });
layout()->set_spacing(10);
set_fill_with_background_color(true);
m_open_button_and_recorded_sample_name_container = add<GUI::Widget>();
- m_open_button_and_recorded_sample_name_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_open_button_and_recorded_sample_name_container->set_layout<GUI::HorizontalBoxLayout>();
m_open_button_and_recorded_sample_name_container->layout()->set_spacing(10);
m_open_button_and_recorded_sample_name_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_open_button_and_recorded_sample_name_container->set_preferred_size(0, 24);
diff --git a/Applications/SoundPlayer/SoundPlayerWidget.cpp b/Applications/SoundPlayer/SoundPlayerWidget.cpp
index 296c641b77..24eb83d60a 100644
--- a/Applications/SoundPlayer/SoundPlayerWidget.cpp
+++ b/Applications/SoundPlayer/SoundPlayerWidget.cpp
@@ -38,12 +38,12 @@ SoundPlayerWidget::SoundPlayerWidget(GUI::Window& window, NonnullRefPtr<Audio::C
, m_manager(connection)
{
set_fill_with_background_color(true);
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 2, 2, 2, 2 });
auto status_widget = add<GUI::Widget>();
status_widget->set_fill_with_background_color(true);
- status_widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ status_widget->set_layout<GUI::HorizontalBoxLayout>();
m_elapsed = status_widget->add<GUI::Label>();
m_elapsed->set_frame_shape(Gfx::FrameShape::Container);
@@ -53,7 +53,7 @@ SoundPlayerWidget::SoundPlayerWidget(GUI::Window& window, NonnullRefPtr<Audio::C
m_elapsed->set_preferred_size(80, 0);
auto sample_widget_container = status_widget->add<GUI::Widget>();
- sample_widget_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ sample_widget_container->set_layout<GUI::HorizontalBoxLayout>();
sample_widget_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
m_sample_widget = sample_widget_container->add<SampleWidget>();
@@ -72,7 +72,7 @@ SoundPlayerWidget::SoundPlayerWidget(GUI::Window& window, NonnullRefPtr<Audio::C
auto control_widget = add<GUI::Widget>();
control_widget->set_fill_with_background_color(true);
- control_widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ control_widget->set_layout<GUI::HorizontalBoxLayout>();
control_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
control_widget->set_preferred_size(0, 30);
control_widget->layout()->set_margins({ 10, 2, 10, 2 });
diff --git a/Applications/SystemMenu/PowerDialog.cpp b/Applications/SystemMenu/PowerDialog.cpp
index 0ce7fa87f8..c65f1495a2 100644
--- a/Applications/SystemMenu/PowerDialog.cpp
+++ b/Applications/SystemMenu/PowerDialog.cpp
@@ -71,7 +71,7 @@ PowerDialog::PowerDialog()
auto main = GUI::Widget::construct();
set_main_widget(main);
- main->set_layout(make<GUI::VerticalBoxLayout>());
+ main->set_layout<GUI::VerticalBoxLayout>();
main->layout()->set_margins({ 8, 8, 8, 8 });
main->layout()->set_spacing(8);
main->set_fill_with_background_color(true);
@@ -99,7 +99,7 @@ PowerDialog::PowerDialog()
}
auto button_box = main->add<GUI::Widget>();
- button_box->set_layout(make<GUI::HorizontalBoxLayout>());
+ button_box->set_layout<GUI::HorizontalBoxLayout>();
button_box->layout()->set_spacing(8);
auto ok_button = button_box->add<GUI::Button>();
diff --git a/Applications/SystemMonitor/MemoryStatsWidget.cpp b/Applications/SystemMonitor/MemoryStatsWidget.cpp
index 83d3b56814..1aee3ab448 100644
--- a/Applications/SystemMonitor/MemoryStatsWidget.cpp
+++ b/Applications/SystemMonitor/MemoryStatsWidget.cpp
@@ -52,13 +52,13 @@ MemoryStatsWidget::MemoryStatsWidget(GraphWidget& graph)
set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
set_preferred_size(0, 72);
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 0, 8, 0, 0 });
layout()->set_spacing(3);
auto build_widgets_for_label = [this](const String& description) -> RefPtr<GUI::Label> {
auto container = add<GUI::Widget>();
- container->set_layout(make<GUI::HorizontalBoxLayout>());
+ container->set_layout<GUI::HorizontalBoxLayout>();
container->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
container->set_preferred_size(275, 12);
auto description_label = container->add<GUI::Label>(description);
diff --git a/Applications/SystemMonitor/NetworkStatisticsWidget.cpp b/Applications/SystemMonitor/NetworkStatisticsWidget.cpp
index 039758bb6d..c6c7f8fd39 100644
--- a/Applications/SystemMonitor/NetworkStatisticsWidget.cpp
+++ b/Applications/SystemMonitor/NetworkStatisticsWidget.cpp
@@ -33,12 +33,12 @@
NetworkStatisticsWidget::NetworkStatisticsWidget()
{
on_first_show = [this](auto&) {
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
set_fill_with_background_color(true);
auto adapters_group_box = add<GUI::GroupBox>("Adapters");
- adapters_group_box->set_layout(make<GUI::VerticalBoxLayout>());
+ adapters_group_box->set_layout<GUI::VerticalBoxLayout>();
adapters_group_box->layout()->set_margins({ 6, 16, 6, 6 });
adapters_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
adapters_group_box->set_preferred_size(0, 120);
@@ -58,7 +58,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
m_adapter_table_view->set_model(GUI::JsonArrayModel::create("/proc/net/adapters", move(net_adapters_fields)));
auto sockets_group_box = add<GUI::GroupBox>("Sockets");
- sockets_group_box->set_layout(make<GUI::VerticalBoxLayout>());
+ sockets_group_box->set_layout<GUI::VerticalBoxLayout>();
sockets_group_box->layout()->set_margins({ 6, 16, 6, 6 });
sockets_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
sockets_group_box->set_preferred_size(0, 0);
diff --git a/Applications/SystemMonitor/ProcessFileDescriptorMapWidget.cpp b/Applications/SystemMonitor/ProcessFileDescriptorMapWidget.cpp
index 133f4a7d86..cd8487873b 100644
--- a/Applications/SystemMonitor/ProcessFileDescriptorMapWidget.cpp
+++ b/Applications/SystemMonitor/ProcessFileDescriptorMapWidget.cpp
@@ -31,7 +31,7 @@
ProcessFileDescriptorMapWidget::ProcessFileDescriptorMapWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
m_table_view = add<GUI::TableView>();
m_table_view->set_size_columns_to_fit_content(true);
diff --git a/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp b/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
index 6dbc4bd05d..9c5e92c16d 100644
--- a/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
+++ b/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
@@ -66,7 +66,7 @@ public:
ProcessMemoryMapWidget::ProcessMemoryMapWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
m_table_view = add<GUI::TableView>();
m_table_view->set_size_columns_to_fit_content(true);
diff --git a/Applications/SystemMonitor/ProcessStacksWidget.cpp b/Applications/SystemMonitor/ProcessStacksWidget.cpp
index f096878a0b..930fd354f7 100644
--- a/Applications/SystemMonitor/ProcessStacksWidget.cpp
+++ b/Applications/SystemMonitor/ProcessStacksWidget.cpp
@@ -32,7 +32,7 @@
ProcessStacksWidget::ProcessStacksWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
m_stacks_editor = add<GUI::TextEditor>();
m_stacks_editor->set_readonly(true);
diff --git a/Applications/SystemMonitor/ProcessUnveiledPathsWidget.cpp b/Applications/SystemMonitor/ProcessUnveiledPathsWidget.cpp
index d10222bc08..7423e50e6b 100644
--- a/Applications/SystemMonitor/ProcessUnveiledPathsWidget.cpp
+++ b/Applications/SystemMonitor/ProcessUnveiledPathsWidget.cpp
@@ -31,7 +31,7 @@
ProcessUnveiledPathsWidget::ProcessUnveiledPathsWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
m_table_view = add<GUI::TableView>();
m_table_view->set_size_columns_to_fit_content(true);
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp
index 6711ddd240..736ffe8120 100644
--- a/Applications/SystemMonitor/main.cpp
+++ b/Applications/SystemMonitor/main.cpp
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
auto keeper = GUI::Widget::construct();
window->set_main_widget(keeper);
- keeper->set_layout(make<GUI::VerticalBoxLayout>());
+ keeper->set_layout<GUI::VerticalBoxLayout>();
keeper->set_fill_with_background_color(true);
keeper->layout()->set_margins({ 4, 4, 4, 4 });
@@ -138,7 +138,7 @@ int main(int argc, char** argv)
auto network_stats_widget = NetworkStatisticsWidget::construct();
tabwidget->add_widget("Network", network_stats_widget);
- process_table_container->set_layout(make<GUI::VerticalBoxLayout>());
+ process_table_container->set_layout<GUI::VerticalBoxLayout>();
process_table_container->layout()->set_margins({ 4, 0, 4, 0 });
process_table_container->layout()->set_spacing(0);
@@ -273,7 +273,7 @@ NonnullRefPtr<GUI::Widget> build_file_systems_tab()
auto fs_widget = GUI::LazyWidget::construct();
fs_widget->on_first_show = [](GUI::LazyWidget& self) {
- self.set_layout(make<GUI::VerticalBoxLayout>());
+ self.set_layout<GUI::VerticalBoxLayout>();
self.layout()->set_margins({ 4, 4, 4, 4 });
auto fs_table_view = self.add<GUI::TableView>();
fs_table_view->set_size_columns_to_fit_content(true);
@@ -366,7 +366,7 @@ NonnullRefPtr<GUI::Widget> build_pci_devices_tab()
auto pci_widget = GUI::LazyWidget::construct();
pci_widget->on_first_show = [](GUI::LazyWidget& self) {
- self.set_layout(make<GUI::VerticalBoxLayout>());
+ self.set_layout<GUI::VerticalBoxLayout>();
self.layout()->set_margins({ 4, 4, 4, 4 });
auto pci_table_view = self.add<GUI::TableView>();
pci_table_view->set_size_columns_to_fit_content(true);
@@ -424,7 +424,7 @@ NonnullRefPtr<GUI::Widget> build_devices_tab()
auto devices_widget = GUI::LazyWidget::construct();
devices_widget->on_first_show = [](GUI::LazyWidget& self) {
- self.set_layout(make<GUI::VerticalBoxLayout>());
+ self.set_layout<GUI::VerticalBoxLayout>();
self.layout()->set_margins({ 4, 4, 4, 4 });
auto devices_table_view = self.add<GUI::TableView>();
@@ -443,11 +443,11 @@ NonnullRefPtr<GUI::Widget> build_graphs_tab()
graphs_container->on_first_show = [](GUI::LazyWidget& self) {
self.set_fill_with_background_color(true);
self.set_background_role(ColorRole::Button);
- self.set_layout(make<GUI::VerticalBoxLayout>());
+ self.set_layout<GUI::VerticalBoxLayout>();
self.layout()->set_margins({ 4, 4, 4, 4 });
auto cpu_graph_group_box = self.add<GUI::GroupBox>("CPU usage");
- cpu_graph_group_box->set_layout(make<GUI::VerticalBoxLayout>());
+ cpu_graph_group_box->set_layout<GUI::VerticalBoxLayout>();
cpu_graph_group_box->layout()->set_margins({ 6, 16, 6, 6 });
cpu_graph_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
cpu_graph_group_box->set_preferred_size(0, 120);
@@ -464,7 +464,7 @@ NonnullRefPtr<GUI::Widget> build_graphs_tab()
};
auto memory_graph_group_box = self.add<GUI::GroupBox>("Memory usage");
- memory_graph_group_box->set_layout(make<GUI::VerticalBoxLayout>());
+ memory_graph_group_box->set_layout<GUI::VerticalBoxLayout>();
memory_graph_group_box->layout()->set_margins({ 6, 16, 6, 6 });
memory_graph_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
memory_graph_group_box->set_preferred_size(0, 120);
diff --git a/Applications/Taskbar/TaskbarWindow.cpp b/Applications/Taskbar/TaskbarWindow.cpp
index 2a20d4148f..f5ec210829 100644
--- a/Applications/Taskbar/TaskbarWindow.cpp
+++ b/Applications/Taskbar/TaskbarWindow.cpp
@@ -48,7 +48,7 @@ TaskbarWindow::TaskbarWindow()
auto widget = GUI::Frame::construct();
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ widget->set_layout<GUI::HorizontalBoxLayout>();
widget->layout()->set_margins({ 3, 2, 3, 2 });
widget->layout()->set_spacing(3);
widget->set_frame_thickness(1);
@@ -71,7 +71,7 @@ void TaskbarWindow::create_quick_launch_bar()
{
auto quick_launch_bar = main_widget()->add<GUI::Frame>();
quick_launch_bar->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
- quick_launch_bar->set_layout(make<GUI::HorizontalBoxLayout>());
+ quick_launch_bar->set_layout<GUI::HorizontalBoxLayout>();
quick_launch_bar->layout()->set_spacing(3);
quick_launch_bar->layout()->set_margins({ 3, 0, 3, 0 });
quick_launch_bar->set_frame_thickness(1);
diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp
index 6fa6ec987e..9f36dd439e 100644
--- a/Applications/Terminal/main.cpp
+++ b/Applications/Terminal/main.cpp
@@ -138,11 +138,11 @@ RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal)
window->set_main_widget(settings);
settings->set_fill_with_background_color(true);
settings->set_background_role(ColorRole::Button);
- settings->set_layout(make<GUI::VerticalBoxLayout>());
+ settings->set_layout<GUI::VerticalBoxLayout>();
settings->layout()->set_margins({ 4, 4, 4, 4 });
auto radio_container = settings->add<GUI::GroupBox>("Bell Mode");
- radio_container->set_layout(make<GUI::VerticalBoxLayout>());
+ radio_container->set_layout<GUI::VerticalBoxLayout>();
radio_container->layout()->set_margins({ 6, 16, 6, 6 });
radio_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
radio_container->set_preferred_size(100, 70);
@@ -156,7 +156,7 @@ RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal)
};
auto slider_container = settings->add<GUI::GroupBox>("Background Opacity");
- slider_container->set_layout(make<GUI::VerticalBoxLayout>());
+ slider_container->set_layout<GUI::VerticalBoxLayout>();
slider_container->layout()->set_margins({ 6, 16, 6, 6 });
slider_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
slider_container->set_preferred_size(100, 50);
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp
index cbaa45af93..cf64838b7a 100644
--- a/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Applications/TextEditor/TextEditorWidget.cpp
@@ -48,7 +48,7 @@
TextEditorWidget::TextEditorWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
layout()->set_spacing(0);
auto toolbar = add<GUI::ToolBar>();
@@ -74,7 +74,7 @@ TextEditorWidget::TextEditorWidget()
m_find_replace_widget->set_fill_with_background_color(true);
m_find_replace_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_find_replace_widget->set_preferred_size(0, 48);
- m_find_replace_widget->set_layout(make<GUI::VerticalBoxLayout>());
+ m_find_replace_widget->set_layout<GUI::VerticalBoxLayout>();
m_find_replace_widget->layout()->set_margins({ 2, 2, 2, 4 });
m_find_replace_widget->set_visible(false);
@@ -82,14 +82,14 @@ TextEditorWidget::TextEditorWidget()
m_find_widget->set_fill_with_background_color(true);
m_find_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_find_widget->set_preferred_size(0, 22);
- m_find_widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_find_widget->set_layout<GUI::HorizontalBoxLayout>();
m_find_widget->set_visible(false);
m_replace_widget = m_find_replace_widget->add<GUI::Widget>();
m_replace_widget->set_fill_with_background_color(true);
m_replace_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_replace_widget->set_preferred_size(0, 22);
- m_replace_widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ m_replace_widget->set_layout<GUI::HorizontalBoxLayout>();
m_replace_widget->set_visible(false);
m_find_textbox = m_find_widget->add<GUI::TextBox>();
diff --git a/Applications/Welcome/main.cpp b/Applications/Welcome/main.cpp
index 17d6369273..d2544fb1a4 100644
--- a/Applications/Welcome/main.cpp
+++ b/Applications/Welcome/main.cpp
@@ -164,7 +164,7 @@ int main(int argc, char** argv)
auto background = BackgroundWidget::construct();
window->set_main_widget(background);
background->set_fill_with_background_color(false);
- background->set_layout(make<GUI::VerticalBoxLayout>());
+ background->set_layout<GUI::VerticalBoxLayout>();
background->layout()->set_margins({ 16, 8, 16, 8 });
background->layout()->set_spacing(8);
background->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
@@ -185,13 +185,13 @@ int main(int argc, char** argv)
//
auto main_section = background->add<GUI::Widget>();
- main_section->set_layout(make<GUI::HorizontalBoxLayout>());
+ main_section->set_layout<GUI::HorizontalBoxLayout>();
main_section->layout()->set_margins({ 0, 0, 0, 0 });
main_section->layout()->set_spacing(8);
main_section->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
auto menu = main_section->add<GUI::Widget>();
- menu->set_layout(make<GUI::VerticalBoxLayout>());
+ menu->set_layout<GUI::VerticalBoxLayout>();
menu->layout()->set_margins({ 0, 0, 0, 0 });
menu->layout()->set_spacing(4);
menu->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
@@ -203,13 +203,13 @@ int main(int argc, char** argv)
bool first = true;
for (auto& page : pages) {
auto content = stack->add<GUI::Widget>();
- content->set_layout(make<GUI::VerticalBoxLayout>());
+ content->set_layout<GUI::VerticalBoxLayout>();
content->layout()->set_margins({ 0, 0, 0, 0 });
content->layout()->set_spacing(8);
content->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
auto title_box = content->add<GUI::Widget>();
- title_box->set_layout(make<GUI::HorizontalBoxLayout>());
+ title_box->set_layout<GUI::HorizontalBoxLayout>();
title_box->layout()->set_spacing(4);
title_box->set_preferred_size(0, 16);
title_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
diff --git a/Demos/WidgetGallery/main.cpp b/Demos/WidgetGallery/main.cpp
index 047601e17e..d7936e437f 100644
--- a/Demos/WidgetGallery/main.cpp
+++ b/Demos/WidgetGallery/main.cpp
@@ -51,7 +51,7 @@ int main(int argc, char** argv)
auto main_widget = GUI::Widget::construct();
window->set_main_widget(main_widget);
main_widget->set_fill_with_background_color(true);
- main_widget->set_layout(make<GUI::VerticalBoxLayout>());
+ main_widget->set_layout<GUI::VerticalBoxLayout>();
main_widget->layout()->set_margins({ 4, 4, 4, 4 });
auto checkbox1 = main_widget->add<GUI::CheckBox>("GCheckBox 1");
@@ -95,7 +95,7 @@ int main(int argc, char** argv)
auto vertical_slider_container = main_widget->add<GUI::Widget>();
vertical_slider_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
vertical_slider_container->set_preferred_size(0, 100);
- vertical_slider_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ vertical_slider_container->set_layout<GUI::HorizontalBoxLayout>();
auto vslider1 = vertical_slider_container->add<GUI::VerticalSlider>();
(void)vslider1;
auto vslider2 = vertical_slider_container->add<GUI::VerticalSlider>();
diff --git a/DevTools/HackStudio/EditorWrapper.cpp b/DevTools/HackStudio/EditorWrapper.cpp
index 2cedd1e32d..e998555b66 100644
--- a/DevTools/HackStudio/EditorWrapper.cpp
+++ b/DevTools/HackStudio/EditorWrapper.cpp
@@ -36,13 +36,13 @@ extern RefPtr<EditorWrapper> g_current_editor_wrapper;
EditorWrapper::EditorWrapper()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
auto label_wrapper = add<GUI::Widget>();
label_wrapper->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
label_wrapper->set_preferred_size(0, 14);
label_wrapper->set_fill_with_background_color(true);
- label_wrapper->set_layout(make<GUI::HorizontalBoxLayout>());
+ label_wrapper->set_layout<GUI::HorizontalBoxLayout>();
label_wrapper->layout()->set_margins({ 2, 0, 2, 0 });
m_filename_label = label_wrapper->add<GUI::Label>("(Untitled)");
diff --git a/DevTools/HackStudio/FindInFilesWidget.cpp b/DevTools/HackStudio/FindInFilesWidget.cpp
index 80711db3b2..db35e44e4e 100644
--- a/DevTools/HackStudio/FindInFilesWidget.cpp
+++ b/DevTools/HackStudio/FindInFilesWidget.cpp
@@ -129,7 +129,7 @@ static RefPtr<SearchResultsModel> find_in_files(const StringView& text)
FindInFilesWidget::FindInFilesWidget()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
m_textbox = add<GUI::TextBox>();
m_textbox->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_textbox->set_preferred_size(0, 20);
diff --git a/DevTools/HackStudio/Locator.cpp b/DevTools/HackStudio/Locator.cpp
index 9724d41347..5ea40170f9 100644
--- a/DevTools/HackStudio/Locator.cpp
+++ b/DevTools/HackStudio/Locator.cpp
@@ -103,7 +103,7 @@ Locator::Locator()
s_header_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-header.png");
}
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
set_preferred_size(0, 20);
m_textbox = add<LocatorTextBox>();
diff --git a/DevTools/HackStudio/ProcessStateWidget.cpp b/DevTools/HackStudio/ProcessStateWidget.cpp
index 3fdf3db0da..4fec5e7ccc 100644
--- a/DevTools/HackStudio/ProcessStateWidget.cpp
+++ b/DevTools/HackStudio/ProcessStateWidget.cpp
@@ -38,7 +38,7 @@ ProcessStateWidget::ProcessStateWidget()
set_preferred_size(0, 20);
set_visible(false);
- set_layout(make<GUI::HorizontalBoxLayout>());
+ set_layout<GUI::HorizontalBoxLayout>();
auto pid_label_label = add<GUI::Label>("Process:");
pid_label_label->set_font(Gfx::Font::default_bold_font());
diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp
index 4adb983420..920a8c99a5 100644
--- a/DevTools/HackStudio/TerminalWrapper.cpp
+++ b/DevTools/HackStudio/TerminalWrapper.cpp
@@ -168,7 +168,7 @@ void TerminalWrapper::kill_running_command()
TerminalWrapper::TerminalWrapper()
{
- set_layout(make<GUI::VerticalBoxLayout>());
+ set_layout<GUI::VerticalBoxLayout>();
RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Terminal");
m_terminal_widget = add<TerminalWidget>(-1, false, config);
diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp
index 3b4db29de0..186f050474 100644
--- a/DevTools/HackStudio/main.cpp
+++ b/DevTools/HackStudio/main.cpp
@@ -145,7 +145,7 @@ int main(int argc, char** argv)
g_window->set_main_widget(widget);
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->set_layout<GUI::VerticalBoxLayout>();
widget->layout()->set_spacing(0);
StringBuilder path;
@@ -266,7 +266,7 @@ int main(int argc, char** argv)
g_right_hand_stack = outer_splitter->add<GUI::StackWidget>();
g_form_inner_container = g_right_hand_stack->add<GUI::Widget>();
- g_form_inner_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ g_form_inner_container->set_layout<GUI::HorizontalBoxLayout>();
auto form_widgets_toolbar = g_form_inner_container->add<GUI::ToolBar>(Orientation::Vertical, 26);
form_widgets_toolbar->set_preferred_size(38, 0);
@@ -304,11 +304,11 @@ int main(int argc, char** argv)
auto form_editing_pane_container = form_editor_inner_splitter->add<GUI::VerticalSplitter>();
form_editing_pane_container->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
form_editing_pane_container->set_preferred_size(190, 0);
- form_editing_pane_container->set_layout(make<GUI::VerticalBoxLayout>());
+ form_editing_pane_container->set_layout<GUI::VerticalBoxLayout>();
auto add_properties_pane = [&](auto& text, auto pane_widget) {
auto wrapper = form_editing_pane_container->add<GUI::Widget>();
- wrapper->set_layout(make<GUI::VerticalBoxLayout>());
+ wrapper->set_layout<GUI::VerticalBoxLayout>();
auto label = wrapper->add<GUI::Label>(text);
label->set_fill_with_background_color(true);
label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
diff --git a/DevTools/Inspector/main.cpp b/DevTools/Inspector/main.cpp
index 611d52491e..ffb1cf288b 100644
--- a/DevTools/Inspector/main.cpp
+++ b/DevTools/Inspector/main.cpp
@@ -61,7 +61,7 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->set_layout<GUI::VerticalBoxLayout>();
auto splitter = widget->add<GUI::HorizontalSplitter>();
diff --git a/DevTools/ProfileViewer/main.cpp b/DevTools/ProfileViewer/main.cpp
index e0716976e3..bdf9ae7020 100644
--- a/DevTools/ProfileViewer/main.cpp
+++ b/DevTools/ProfileViewer/main.cpp
@@ -60,7 +60,7 @@ int main(int argc, char** argv)
auto main_widget = GUI::Widget::construct();
window->set_main_widget(main_widget);
main_widget->set_fill_with_background_color(true);
- main_widget->set_layout(make<GUI::VerticalBoxLayout>());
+ main_widget->set_layout<GUI::VerticalBoxLayout>();
auto timeline_widget = main_widget->add<ProfileTimelineWidget>(*profile);
diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp
index 3356623771..c9aa3c3d6e 100644
--- a/DevTools/VisualBuilder/VBForm.cpp
+++ b/DevTools/VisualBuilder/VBForm.cpp
@@ -64,13 +64,13 @@ VBForm::VBForm(const String& name)
m_context_menu->add_action(GUI::Action::create("Lay out horizontally", Gfx::Bitmap::load_from_file("/res/icons/16x16/layout-horizontally.png"), [this](auto&) {
if (auto* widget = single_selected_widget()) {
dbg() << "Giving " << *widget->gwidget() << " a horizontal box layout";
- widget->gwidget()->set_layout(make<GUI::HorizontalBoxLayout>());
+ widget->gwidget()->set_layout<GUI::HorizontalBoxLayout>();
}
}));
m_context_menu->add_action(GUI::Action::create("Lay out vertically", Gfx::Bitmap::load_from_file("/res/icons/16x16/layout-vertically.png"), [this](auto&) {
if (auto* widget = single_selected_widget()) {
dbg() << "Giving " << *widget->gwidget() << " a vertical box layout";
- widget->gwidget()->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->gwidget()->set_layout<GUI::VerticalBoxLayout>();
}
}));
m_context_menu->add_separator();
diff --git a/DevTools/VisualBuilder/VBPropertiesWindow.cpp b/DevTools/VisualBuilder/VBPropertiesWindow.cpp
index a5150fb4df..350795adcf 100644
--- a/DevTools/VisualBuilder/VBPropertiesWindow.cpp
+++ b/DevTools/VisualBuilder/VBPropertiesWindow.cpp
@@ -83,7 +83,7 @@ VBPropertiesWindow::VBPropertiesWindow()
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->set_layout<GUI::VerticalBoxLayout>();
widget->layout()->set_margins({ 2, 2, 2, 2 });
set_main_widget(widget);
diff --git a/DevTools/VisualBuilder/main.cpp b/DevTools/VisualBuilder/main.cpp
index 6b38a5fa46..228a47d4d6 100644
--- a/DevTools/VisualBuilder/main.cpp
+++ b/DevTools/VisualBuilder/main.cpp
@@ -108,7 +108,7 @@ RefPtr<GUI::Window> make_toolbox_window()
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->set_layout<GUI::VerticalBoxLayout>();
widget->layout()->set_spacing(0);
window->set_main_widget(widget);
diff --git a/Games/Minesweeper/main.cpp b/Games/Minesweeper/main.cpp
index 10e162ba31..fa33033a31 100644
--- a/Games/Minesweeper/main.cpp
+++ b/Games/Minesweeper/main.cpp
@@ -59,14 +59,14 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
- widget->set_layout(make<GUI::VerticalBoxLayout>());
+ widget->set_layout<GUI::VerticalBoxLayout>();
widget->layout()->set_spacing(0);
auto container = widget->add<GUI::Widget>();
container->set_fill_with_background_color(true);
container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
container->set_preferred_size(0, 36);
- container->set_layout(make<GUI::HorizontalBoxLayout>());
+ container->set_layout<GUI::HorizontalBoxLayout>();
auto flag_icon_label = container->add<GUI::Label>();
flag_icon_label->set_icon(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/flag.png"));
auto flag_label = container->add<GUI::Label>();
diff --git a/Libraries/LibGUI/AboutDialog.cpp b/Libraries/LibGUI/AboutDialog.cpp
index 615d30ae20..1de49c2c3b 100644
--- a/Libraries/LibGUI/AboutDialog.cpp
+++ b/Libraries/LibGUI/AboutDialog.cpp
@@ -45,12 +45,12 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Core::
auto widget = Widget::construct();
set_main_widget(widget);
widget->set_fill_with_background_color(true);
- widget->set_layout(make<HorizontalBoxLayout>());
+ widget->set_layout<HorizontalBoxLayout>();
auto left_container = widget->add<Widget>();
left_container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
left_container->set_preferred_size(48, 0);
- left_container->set_layout(make<VerticalBoxLayout>());
+ left_container->set_layout<VerticalBoxLayout>();
auto icon_label = left_container->add<Label>();
icon_label->set_icon(m_icon);
icon_label->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
@@ -58,7 +58,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Core::
left_container->layout()->add_spacer();
auto right_container = widget->add<Widget>();
- right_container->set_layout(make<VerticalBoxLayout>());
+ right_container->set_layout<VerticalBoxLayout>();
right_container->layout()->set_margins({ 0, 4, 4, 4 });
auto make_label = [&](const StringView& text, bool bold = false) {
@@ -78,7 +78,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Core::
auto button_container = right_container->add<Widget>();
button_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button_container->set_preferred_size(0, 20);
- button_container->set_layout(make<HorizontalBoxLayout>());
+ button_container->set_layout<HorizontalBoxLayout>();
button_container->layout()->add_spacer();
auto ok_button = button_container->add<Button>("OK");
ok_button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
diff --git a/Libraries/LibGUI/ColorPicker.cpp b/Libraries/LibGUI/ColorPicker.cpp
index d1e8009054..2f453570fd 100644
--- a/Libraries/LibGUI/ColorPicker.cpp
+++ b/Libraries/LibGUI/ColorPicker.cpp
@@ -50,15 +50,15 @@ void ColorPicker::build()
{
auto horizontal_container = Widget::construct();
horizontal_container->set_fill_with_background_color(true);
- horizontal_container->set_layout(make<HorizontalBoxLayout>());
+ horizontal_container->set_layout<HorizontalBoxLayout>();
horizontal_container->layout()->set_margins({ 4, 4, 4, 4 });
set_main_widget(horizontal_container);
auto left_vertical_container = horizontal_container->add<Widget>();
- left_vertical_container->set_layout(make<VerticalBoxLayout>());
+ left_vertical_container->set_layout<VerticalBoxLayout>();
auto right_vertical_container = horizontal_container->add<Widget>();
- right_vertical_container->set_layout(make<VerticalBoxLayout>());
+ right_vertical_container->set_layout<VerticalBoxLayout>();
enum RGBComponent {
Red,
diff --git a/Libraries/LibGUI/FilePicker.cpp b/Libraries/LibGUI/FilePicker.cpp
index 96a6005c1d..d2988b3a4b 100644
--- a/Libraries/LibGUI/FilePicker.cpp
+++ b/Libraries/LibGUI/FilePicker.cpp
@@ -83,16 +83,16 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
set_rect(200, 200, 700, 400);
auto horizontal_container = Widget::construct();
set_main_widget(horizontal_container);
- horizontal_container->set_layout(make<HorizontalBoxLayout>());
+ horizontal_container->set_layout<HorizontalBoxLayout>();
horizontal_container->layout()->set_margins({ 4, 4, 4, 4 });
horizontal_container->set_fill_with_background_color(true);
auto vertical_container = horizontal_container->add<Widget>();
- vertical_container->set_layout(make<VerticalBoxLayout>());
+ vertical_container->set_layout<VerticalBoxLayout>();
vertical_container->layout()->set_spacing(4);
auto upper_container = vertical_container->add<Widget>();
- upper_container->set_layout(make<HorizontalBoxLayout>());
+ upper_container->set_layout<HorizontalBoxLayout>();
upper_container->layout()->set_spacing(4);
upper_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
upper_container->set_preferred_size(0, 26);
@@ -162,7 +162,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
#endif
auto lower_container = vertical_container->add<Widget>();
- lower_container->set_layout(make<VerticalBoxLayout>());
+ lower_container->set_layout<VerticalBoxLayout>();
lower_container->layout()->set_spacing(4);
lower_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
lower_container->set_preferred_size(0, 60);
@@ -170,7 +170,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
auto filename_container = lower_container->add<Widget>();
filename_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
filename_container->set_preferred_size(0, 20);
- filename_container->set_layout(make<HorizontalBoxLayout>());
+ filename_container->set_layout<HorizontalBoxLayout>();
auto filename_label = filename_container->add<Label>("File name:");
filename_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
filename_label->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
@@ -202,7 +202,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
auto button_container = lower_container->add<Widget>();
button_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button_container->set_preferred_size(0, 20);
- button_container->set_layout(make<HorizontalBoxLayout>());
+ button_container->set_layout<HorizontalBoxLayout>();
button_container->layout()->set_spacing(4);
button_container->layout()->add_spacer();
@@ -239,7 +239,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
auto preview_container = horizontal_container->add<Frame>();
preview_container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
preview_container->set_preferred_size(180, 0);
- preview_container->set_layout(make<VerticalBoxLayout>());
+ preview_container->set_layout<VerticalBoxLayout>();
preview_container->layout()->set_margins({ 8, 8, 8, 8 });
m_preview_image_label = preview_container->add<Label>();
diff --git a/Libraries/LibGUI/InputBox.cpp b/Libraries/LibGUI/InputBox.cpp
index 4d4baf6b45..32c3e24c02 100644
--- a/Libraries/LibGUI/InputBox.cpp
+++ b/Libraries/LibGUI/InputBox.cpp
@@ -57,7 +57,7 @@ void InputBox::build()
set_rect(x(), y(), max_width + 80, 80);
- widget->set_layout(make<VerticalBoxLayout>());
+ widget->set_layout<VerticalBoxLayout>();
widget->set_fill_with_background_color(true);
widget->layout()->set_margins({ 8, 8, 8, 8 });
@@ -74,10 +74,10 @@ void InputBox::build()
auto button_container_outer = widget->add<Widget>();
button_container_outer->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button_container_outer->set_preferred_size(0, 20);
- button_container_outer->set_layout(make<VerticalBoxLayout>());
+ button_container_outer->set_layout<VerticalBoxLayout>();
auto button_container_inner = button_container_outer->add<Widget>();
- button_container_inner->set_layout(make<HorizontalBoxLayout>());
+ button_container_inner->set_layout<HorizontalBoxLayout>();
button_container_inner->layout()->set_spacing(8);
m_cancel_button = button_container_inner->add<Button>();
diff --git a/Libraries/LibGUI/MessageBox.cpp b/Libraries/LibGUI/MessageBox.cpp
index e0b00f4fbd..78319508a6 100644
--- a/Libraries/LibGUI/MessageBox.cpp
+++ b/Libraries/LibGUI/MessageBox.cpp
@@ -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 });
diff --git a/Libraries/LibGUI/StatusBar.cpp b/Libraries/LibGUI/StatusBar.cpp
index 9019816abb..1217d764bf 100644
--- a/Libraries/LibGUI/StatusBar.cpp
+++ b/Libraries/LibGUI/StatusBar.cpp
@@ -38,7 +38,7 @@ StatusBar::StatusBar(int label_count)
{
set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
set_preferred_size(0, 20);
- set_layout(make<HorizontalBoxLayout>());
+ set_layout<HorizontalBoxLayout>();
layout()->set_margins({ 2, 2, 2, 2 });
layout()->set_spacing(2);
diff --git a/Servers/NotificationServer/NotificationWindow.cpp b/Servers/NotificationServer/NotificationWindow.cpp
index 8ec50c3812..2272ca6fd1 100644
--- a/Servers/NotificationServer/NotificationWindow.cpp
+++ b/Servers/NotificationServer/NotificationWindow.cpp
@@ -64,12 +64,12 @@ NotificationWindow::NotificationWindow(const String& text, const String& title)
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
- widget->set_layout(make<GUI::HorizontalBoxLayout>());
+ widget->set_layout<GUI::HorizontalBoxLayout>();
widget->layout()->set_margins({ 4, 4, 4, 4 });
widget->layout()->set_spacing(4);
auto left_container = widget->add<GUI::Widget>();
- left_container->set_layout(make<GUI::VerticalBoxLayout>());
+ left_container->set_layout<GUI::VerticalBoxLayout>();
auto title_label = left_container->add<GUI::Label>(title);
title_label->set_font(Gfx::Font::default_bold_font());
@@ -80,7 +80,7 @@ NotificationWindow::NotificationWindow(const String& text, const String& title)
auto right_container = widget->add<GUI::Widget>();
right_container->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
right_container->set_preferred_size(40, 0);
- right_container->set_layout(make<GUI::HorizontalBoxLayout>());
+ right_container->set_layout<GUI::HorizontalBoxLayout>();
auto button = right_container->add<GUI::Button>("Okay");
button->on_click = [this] {