1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 13:15:08 +00:00

LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients

This commit is contained in:
Andreas Kling 2020-03-04 09:46:23 +01:00
parent 4697195645
commit 0f3e57a6fb
37 changed files with 203 additions and 246 deletions

View file

@ -81,13 +81,12 @@ VBPropertiesWindow::VBPropertiesWindow()
set_title("Properties");
set_rect(780, 200, 240, 280);
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
widget->set_layout<GUI::VerticalBoxLayout>();
widget->layout()->set_margins({ 2, 2, 2, 2 });
set_main_widget(widget);
auto& widget = set_main_widget<GUI::Widget>();
widget.set_fill_with_background_color(true);
widget.set_layout<GUI::VerticalBoxLayout>();
widget.layout()->set_margins({ 2, 2, 2, 2 });
m_table_view = widget->add<GUI::TableView>();
m_table_view = widget.add<GUI::TableView>();
m_table_view->set_headers_visible(false);
m_table_view->set_editable(true);