mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 17:55:09 +00:00
LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients
This commit is contained in:
parent
4697195645
commit
0f3e57a6fb
37 changed files with 203 additions and 246 deletions
|
@ -179,13 +179,12 @@ void IRCAppWindow::setup_menus()
|
|||
|
||||
void IRCAppWindow::setup_widgets()
|
||||
{
|
||||
auto widget = GUI::Widget::construct();
|
||||
set_main_widget(widget);
|
||||
widget->set_fill_with_background_color(true);
|
||||
widget->set_layout<GUI::VerticalBoxLayout>();
|
||||
widget->layout()->set_spacing(0);
|
||||
auto& widget = set_main_widget<GUI::Widget>();
|
||||
widget.set_fill_with_background_color(true);
|
||||
widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
widget.layout()->set_spacing(0);
|
||||
|
||||
auto toolbar = widget->add<GUI::ToolBar>();
|
||||
auto toolbar = widget.add<GUI::ToolBar>();
|
||||
toolbar->set_has_frame(false);
|
||||
toolbar->add_action(*m_change_nick_action);
|
||||
toolbar->add_separator();
|
||||
|
@ -196,7 +195,7 @@ void IRCAppWindow::setup_widgets()
|
|||
toolbar->add_action(*m_open_query_action);
|
||||
toolbar->add_action(*m_close_query_action);
|
||||
|
||||
auto outer_container = widget->add<GUI::Widget>();
|
||||
auto outer_container = widget.add<GUI::Widget>();
|
||||
outer_container->set_layout<GUI::VerticalBoxLayout>();
|
||||
outer_container->layout()->set_margins({ 2, 0, 2, 2 });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue