1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:07:46 +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:
Andreas Kling 2023-08-13 14:52:36 +02:00
parent 341626e2ea
commit 8322b31b97
52 changed files with 127 additions and 135 deletions

View file

@ -167,10 +167,10 @@ static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
main_widget->set_fill_with_background_color(true);
main_widget->set_background_role(ColorRole::Button);
TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(4));
main_widget->set_layout<GUI::VerticalBoxLayout>(4);
auto find = TRY(main_widget->try_add<GUI::Widget>());
TRY(find->try_set_layout<GUI::HorizontalBoxLayout>(4));
find->set_layout<GUI::HorizontalBoxLayout>(4);
find->set_fixed_height(30);
auto find_textbox = TRY(find->try_add<GUI::TextBox>());