mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:17:35 +00:00
LibGUI: Remove Widget::try_set_layout<T>()
And fall back to the infallible set_layout<T>(). Work towards #20557.
This commit is contained in:
parent
341626e2ea
commit
8322b31b97
52 changed files with 127 additions and 135 deletions
|
@ -466,12 +466,12 @@ ErrorOr<void> MainWidget::add_property_tab(PropertyTab const& property_tab)
|
|||
|
||||
auto properties_list = TRY(GUI::Widget::try_create());
|
||||
scrollable_container->set_widget(properties_list);
|
||||
TRY(properties_list->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 8 }, 12));
|
||||
properties_list->set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 8 }, 12);
|
||||
|
||||
for (auto const& group : property_tab.property_groups) {
|
||||
NonnullRefPtr<GUI::GroupBox> group_box = TRY(properties_list->try_add<GUI::GroupBox>(group.title));
|
||||
// 1px less on the left makes the text line up with the group title.
|
||||
TRY(group_box->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 8, 8, 8, 7 }, 12));
|
||||
group_box->set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 8, 8, 8, 7 }, 12);
|
||||
group_box->set_preferred_height(GUI::SpecialDimension::Fit);
|
||||
|
||||
for (auto const& property : group.properties) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue