1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

Userland: Prefer non-fallible construction for LibGUI objects

This commit is contained in:
Tim Ledbetter 2023-09-18 06:00:51 +01:00 committed by Andreas Kling
parent a4a94de942
commit a6f6a1afd2
54 changed files with 69 additions and 70 deletions

View file

@ -464,7 +464,7 @@ ErrorOr<void> MainWidget::add_property_tab(PropertyTab const& property_tab)
auto& scrollable_container = m_property_tabs->add_tab<GUI::ScrollableContainerWidget>(TRY(String::from_utf8(property_tab.title)));
scrollable_container.set_should_hide_unnecessary_scrollbars(true);
auto properties_list = TRY(GUI::Widget::try_create());
auto properties_list = GUI::Widget::construct();
scrollable_container.set_widget(properties_list);
properties_list->set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 8 }, 12);