mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:37:34 +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
|
@ -42,7 +42,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto catdog_widget = TRY(CatDog::create());
|
||||
window->set_main_widget(catdog_widget);
|
||||
TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
|
||||
catdog_widget->set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0);
|
||||
|
||||
auto context_menu = TRY(GUI::Menu::try_create());
|
||||
TRY(context_menu->try_add_action(GUI::CommonActions::make_about_action("CatDog Demo", app_icon, window)));
|
||||
|
@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
advice_window->set_alpha_hit_threshold(1.0f);
|
||||
|
||||
auto advice_widget = TRY(advice_window->set_main_widget<SpeechBubble>(catdog_widget));
|
||||
TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
|
||||
advice_widget->set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0);
|
||||
|
||||
auto advice_timer = TRY(Core::Timer::create_single_shot(15'000, [&] {
|
||||
window->move_to_front();
|
||||
|
|
|
@ -13,7 +13,7 @@ GalleryWidget::GalleryWidget()
|
|||
set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
auto& inner_widget = add<GUI::Widget>();
|
||||
inner_widget.try_set_layout<GUI::VerticalBoxLayout>(4).release_value_but_fixme_should_propagate_errors();
|
||||
inner_widget.set_layout<GUI::VerticalBoxLayout>(4);
|
||||
|
||||
m_tab_widget = inner_widget.try_add<GUI::TabWidget>().release_value_but_fixme_should_propagate_errors();
|
||||
m_statusbar = add<GUI::Statusbar>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue