1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:27:35 +00:00

LibGUI: Remove Layout::try_add_spacer()

And fall back to the infallible add_spacer().

Work towards #20557.
This commit is contained in:
Andreas Kling 2023-08-13 18:29:05 +02:00
parent 8322b31b97
commit 58e482a06d
22 changed files with 28 additions and 35 deletions

View file

@ -55,7 +55,7 @@ CellTypeDialog::CellTypeDialog(Vector<Position> const& positions, Sheet& sheet,
auto& buttonbox = main_widget->add<GUI::Widget>();
buttonbox.set_shrink_to_fit(true);
buttonbox.set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 10);
buttonbox.add_spacer().release_value_but_fixme_should_propagate_errors();
buttonbox.add_spacer();
auto& ok_button = buttonbox.add<GUI::Button>("OK"_string);
ok_button.set_fixed_width(80);
ok_button.on_click = [&](auto) { done(ExecResult::OK); };