Userspace: Use Core::Object::add() when building interfaces

This commit is contained in:
Andreas Kling 2020-02-23 10:57:42 +01:00
commit 3d20da9ee4
Notes: sideshowbarker 2024-07-19 09:08:47 +09:00
87 changed files with 403 additions and 438 deletions

View file

@ -82,18 +82,18 @@ int main(int argc, char* argv[])
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
auto toolbar = GUI::ToolBar::construct(widget);
auto toolbar = widget->add<GUI::ToolBar>();
auto splitter = GUI::HorizontalSplitter::construct(widget);
auto splitter = widget->add<GUI::HorizontalSplitter>();
auto model = ManualModel::create();
auto tree_view = GUI::TreeView::construct(splitter);
auto tree_view = splitter->add<GUI::TreeView>();
tree_view->set_model(model);
tree_view->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
tree_view->set_preferred_size(200, 500);
auto html_view = HtmlView::construct(splitter);
auto html_view = splitter->add<HtmlView>();
History history;