diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-02 09:48:11 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-02 15:09:48 +0100 |
commit | d67da8c1015c923d799409fee9bf6dd2eafc82b8 (patch) | |
tree | 554e5304a94b3b5aab8d60cca5846a1643d00175 /DevTools | |
parent | 63364f8a5d70fbbf851c10cff4da62b1ae51177d (diff) | |
download | serenity-d67da8c1015c923d799409fee9bf6dd2eafc82b8.zip |
LibGUI: Add GHBoxLayout and GVBoxLayout convenience classes
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 5bdd140dd6..c9c920c27e 100644 --- a/DevTools/HackStudio/EditorWrapper.cpp +++ b/DevTools/HackStudio/EditorWrapper.cpp @@ -36,13 +36,13 @@ extern RefPtr<EditorWrapper> g_current_editor_wrapper; EditorWrapper::EditorWrapper(GWidget* parent) : GWidget(parent) { - set_layout(make<GBoxLayout>(Orientation::Vertical)); + set_layout(make<GVBoxLayout>()); auto label_wrapper = GWidget::construct(this); label_wrapper->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); label_wrapper->set_preferred_size(0, 14); label_wrapper->set_fill_with_background_color(true); - label_wrapper->set_layout(make<GBoxLayout>(Orientation::Horizontal)); + label_wrapper->set_layout(make<GHBoxLayout>()); label_wrapper->layout()->set_margins({ 2, 0, 2, 0 }); m_filename_label = GLabel::construct("(Untitled)", label_wrapper); diff --git a/DevTools/HackStudio/FindInFilesWidget.cpp b/DevTools/HackStudio/FindInFilesWidget.cpp index e41893f1fa..1c70410f00 100644 --- a/DevTools/HackStudio/FindInFilesWidget.cpp +++ b/DevTools/HackStudio/FindInFilesWidget.cpp @@ -130,7 +130,7 @@ static RefPtr<SearchResultsModel> find_in_files(const StringView& text) FindInFilesWidget::FindInFilesWidget(GWidget* parent) : GWidget(parent) { - set_layout(make<GBoxLayout>(Orientation::Vertical)); + set_layout(make<GVBoxLayout>()); m_textbox = GTextBox::construct(this); m_textbox->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); m_textbox->set_preferred_size(0, 20); diff --git a/DevTools/HackStudio/Locator.cpp b/DevTools/HackStudio/Locator.cpp index 7a57f78077..888425c80a 100644 --- a/DevTools/HackStudio/Locator.cpp +++ b/DevTools/HackStudio/Locator.cpp @@ -107,7 +107,7 @@ Locator::Locator(GWidget* parent) s_header_icon = GraphicsBitmap::load_from_file("/res/icons/16x16/filetype-header.png"); } - set_layout(make<GBoxLayout>(Orientation::Vertical)); + set_layout(make<GVBoxLayout>()); set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); set_preferred_size(0, 20); m_textbox = LocatorTextBox::construct(this); diff --git a/DevTools/HackStudio/ProcessStateWidget.cpp b/DevTools/HackStudio/ProcessStateWidget.cpp index ad82e1a9a9..00dd7172e7 100644 --- a/DevTools/HackStudio/ProcessStateWidget.cpp +++ b/DevTools/HackStudio/ProcessStateWidget.cpp @@ -38,7 +38,7 @@ ProcessStateWidget::ProcessStateWidget(GWidget* parent) set_preferred_size(0, 20); set_visible(false); - set_layout(make<GBoxLayout>(Orientation::Horizontal)); + set_layout(make<GHBoxLayout>()); auto pid_label_label = GLabel::construct("Process:", this); pid_label_label->set_font(Font::default_bold_font()); diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp index 9b12508851..1b43870aa9 100644 --- a/DevTools/HackStudio/TerminalWrapper.cpp +++ b/DevTools/HackStudio/TerminalWrapper.cpp @@ -161,7 +161,7 @@ void TerminalWrapper::kill_running_command() TerminalWrapper::TerminalWrapper(GWidget* parent) : GWidget(parent) { - set_layout(make<GBoxLayout>(Orientation::Vertical)); + set_layout(make<GVBoxLayout>()); RefPtr<CConfigFile> config = CConfigFile::get_for_app("Terminal"); m_terminal_widget = TerminalWidget::construct(-1, false, config); diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp index 53b85b3fc4..55b0ddfc44 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<GBoxLayout>(Orientation::Vertical)); + widget->set_layout(make<GVBoxLayout>()); widget->layout()->set_spacing(0); StringBuilder path; @@ -266,7 +266,7 @@ int main(int argc, char** argv) g_right_hand_stack = GStackWidget::construct(outer_splitter); g_form_inner_container = GWidget::construct(g_right_hand_stack); - g_form_inner_container->set_layout(make<GBoxLayout>(Orientation::Horizontal)); + g_form_inner_container->set_layout(make<GHBoxLayout>()); auto form_widgets_toolbar = GToolBar::construct(Orientation::Vertical, 26, g_form_inner_container); form_widgets_toolbar->set_preferred_size(38, 0); @@ -303,11 +303,11 @@ int main(int argc, char** argv) auto form_editing_pane_container = GSplitter::construct(Orientation::Vertical, form_editor_inner_splitter); form_editing_pane_container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill); form_editing_pane_container->set_preferred_size(190, 0); - form_editing_pane_container->set_layout(make<GBoxLayout>(Orientation::Vertical)); + form_editing_pane_container->set_layout(make<GVBoxLayout>()); auto add_properties_pane = [&](auto& text, auto pane_widget) { auto wrapper = GWidget::construct(form_editing_pane_container.ptr()); - wrapper->set_layout(make<GBoxLayout>(Orientation::Vertical)); + wrapper->set_layout(make<GVBoxLayout>()); auto label = GLabel::construct(text, wrapper); label->set_fill_with_background_color(true); label->set_text_alignment(TextAlignment::CenterLeft); diff --git a/DevTools/Inspector/main.cpp b/DevTools/Inspector/main.cpp index 66e350ac1a..99548c5724 100644 --- a/DevTools/Inspector/main.cpp +++ b/DevTools/Inspector/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char** argv) auto widget = GWidget::construct(); window->set_main_widget(widget); widget->set_fill_with_background_color(true); - widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); + widget->set_layout(make<GVBoxLayout>()); auto splitter = GSplitter::construct(Orientation::Horizontal, widget); diff --git a/DevTools/ProfileViewer/main.cpp b/DevTools/ProfileViewer/main.cpp index 4912cce5a7..dc3aaf8bf1 100644 --- a/DevTools/ProfileViewer/main.cpp +++ b/DevTools/ProfileViewer/main.cpp @@ -59,7 +59,7 @@ int main(int argc, char** argv) auto main_widget = GWidget::construct(); window->set_main_widget(main_widget); main_widget->set_fill_with_background_color(true); - main_widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); + main_widget->set_layout(make<GVBoxLayout>()); auto timeline_widget = ProfileTimelineWidget::construct(*profile, main_widget); diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp index cb844cfa9f..e829840f1d 100644 --- a/DevTools/VisualBuilder/VBForm.cpp +++ b/DevTools/VisualBuilder/VBForm.cpp @@ -66,13 +66,13 @@ VBForm::VBForm(const String& name, GWidget* parent) m_context_menu->add_action(GAction::create("Lay out horizontally", load_png("/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<GBoxLayout>(Orientation::Horizontal)); + widget->gwidget()->set_layout(make<GHBoxLayout>()); } })); m_context_menu->add_action(GAction::create("Lay out vertically", load_png("/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<GBoxLayout>(Orientation::Vertical)); + widget->gwidget()->set_layout(make<GVBoxLayout>()); } })); m_context_menu->add_separator(); diff --git a/DevTools/VisualBuilder/VBPropertiesWindow.cpp b/DevTools/VisualBuilder/VBPropertiesWindow.cpp index 6965e31b38..08da65f082 100644 --- a/DevTools/VisualBuilder/VBPropertiesWindow.cpp +++ b/DevTools/VisualBuilder/VBPropertiesWindow.cpp @@ -83,7 +83,7 @@ VBPropertiesWindow::VBPropertiesWindow() auto widget = GWidget::construct(); widget->set_fill_with_background_color(true); - widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); + widget->set_layout(make<GVBoxLayout>()); 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 4f26773a98..fc971c2189 100644 --- a/DevTools/VisualBuilder/main.cpp +++ b/DevTools/VisualBuilder/main.cpp @@ -108,7 +108,7 @@ RefPtr<GWindow> make_toolbox_window() auto widget = GWidget::construct(); widget->set_fill_with_background_color(true); - widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); + widget->set_layout(make<GVBoxLayout>()); widget->layout()->set_spacing(0); window->set_main_widget(widget); |