mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +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
|
@ -73,11 +73,11 @@ ErrorOr<GUI::Widget*> WandSelectTool::get_properties_widget()
|
|||
}
|
||||
|
||||
auto properties_widget = TRY(GUI::Widget::try_create());
|
||||
(void)TRY(properties_widget->try_set_layout<GUI::VerticalBoxLayout>());
|
||||
properties_widget->set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
auto threshold_container = TRY(properties_widget->try_add<GUI::Widget>());
|
||||
threshold_container->set_fixed_height(20);
|
||||
(void)TRY(threshold_container->try_set_layout<GUI::HorizontalBoxLayout>());
|
||||
threshold_container->set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
||||
auto threshold_label = TRY(threshold_container->try_add<GUI::Label>("Threshold:"_string));
|
||||
threshold_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
|
@ -94,7 +94,7 @@ ErrorOr<GUI::Widget*> WandSelectTool::get_properties_widget()
|
|||
|
||||
auto mode_container = TRY(properties_widget->try_add<GUI::Widget>());
|
||||
mode_container->set_fixed_height(20);
|
||||
(void)TRY(mode_container->try_set_layout<GUI::HorizontalBoxLayout>());
|
||||
mode_container->set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
||||
auto mode_label = TRY(mode_container->try_add<GUI::Label>());
|
||||
mode_label->set_text("Mode:"_string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue