diff options
Diffstat (limited to 'Applications/IRCClient/IRCAppWindow.cpp')
-rw-r--r-- | Applications/IRCClient/IRCAppWindow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp index 80f9d8967c..0662fb0670 100644 --- a/Applications/IRCClient/IRCAppWindow.cpp +++ b/Applications/IRCClient/IRCAppWindow.cpp @@ -94,7 +94,7 @@ void IRCAppWindow::setup_client() }; if (m_client->hostname().is_empty()) { - auto input_box = GUI::InputBox::construct("Enter server:", "Connect to server", this); + auto input_box = add<GUI::InputBox>("Enter server:", "Connect to server"); auto result = input_box->exec(); if (result == GUI::InputBox::ExecCancel) ::exit(0); @@ -109,7 +109,7 @@ void IRCAppWindow::setup_client() void IRCAppWindow::setup_actions() { m_join_action = GUI::Action::create("Join channel", { Mod_Ctrl, Key_J }, Gfx::Bitmap::load_from_file("/res/icons/16x16/irc-join.png"), [&](auto&) { - auto input_box = GUI::InputBox::construct("Enter channel name:", "Join channel", this); + auto input_box = add<GUI::InputBox>("Enter channel name:", "Join channel"); if (input_box->exec() == GUI::InputBox::ExecOK && !input_box->text_value().is_empty()) m_client->handle_join_action(input_box->text_value()); }); @@ -185,7 +185,7 @@ void IRCAppWindow::setup_widgets() widget->set_layout(make<GUI::VerticalBoxLayout>()); widget->layout()->set_spacing(0); - auto toolbar = GUI::ToolBar::construct(widget); + auto toolbar = widget->add<GUI::ToolBar>(); toolbar->set_has_frame(false); toolbar->add_action(*m_change_nick_action); toolbar->add_separator(); @@ -196,13 +196,13 @@ void IRCAppWindow::setup_widgets() toolbar->add_action(*m_open_query_action); toolbar->add_action(*m_close_query_action); - auto outer_container = GUI::Widget::construct(widget.ptr()); + auto outer_container = widget->add<GUI::Widget>(); outer_container->set_layout(make<GUI::VerticalBoxLayout>()); outer_container->layout()->set_margins({ 2, 0, 2, 2 }); - auto horizontal_container = GUI::HorizontalSplitter::construct(outer_container); + auto horizontal_container = outer_container->add<GUI::HorizontalSplitter>(); - m_window_list = GUI::TableView::construct(horizontal_container); + m_window_list = horizontal_container->add<GUI::TableView>(); m_window_list->set_headers_visible(false); m_window_list->set_alternating_row_colors(false); m_window_list->set_size_columns_to_fit_content(true); @@ -214,7 +214,7 @@ void IRCAppWindow::setup_widgets() set_active_window(m_client->window_at(index.row())); }; - m_container = GUI::StackWidget::construct(horizontal_container); + m_container = horizontal_container->add<GUI::StackWidget>(); m_container->on_active_widget_change = [this](auto*) { update_part_action(); }; |