diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-04 09:43:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-04 13:49:48 +0100 |
commit | 4697195645a4c66930761c85685f5752dc777bba (patch) | |
tree | cc77feb29541d43323a5edce70f05412ab1e8e68 /DevTools | |
parent | 03e0ddce5237b6ad7b84724ef03039e413944f00 (diff) | |
download | serenity-4697195645a4c66930761c85685f5752dc777bba.zip |
LibGUI: Use set_layout<LayoutType>() in lots of client code
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/HackStudio/EditorWrapper.cpp | 4 | ||||
-rw-r--r-- | DevTools/HackStudio/FindInFilesWidget.cpp | 2 | ||||
-rw-r--r-- | DevTools/HackStudio/Locator.cpp | 2 | ||||
-rw-r--r-- | DevTools/HackStudio/ProcessStateWidget.cpp | 2 | ||||
-rw-r--r-- | DevTools/HackStudio/TerminalWrapper.cpp | 2 | ||||
-rw-r--r-- | DevTools/HackStudio/main.cpp | 8 | ||||
-rw-r--r-- | DevTools/Inspector/main.cpp | 2 | ||||
-rw-r--r-- | DevTools/ProfileViewer/main.cpp | 2 | ||||
-rw-r--r-- | DevTools/VisualBuilder/VBForm.cpp | 4 | ||||
-rw-r--r-- | DevTools/VisualBuilder/VBPropertiesWindow.cpp | 2 | ||||
-rw-r--r-- | DevTools/VisualBuilder/main.cpp | 2 |
11 files changed, 16 insertions, 16 deletions
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); |