1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07: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

@ -69,7 +69,7 @@ DownloadWidget::DownloadWidget(const URL& url)
m_browser_image = animation_container.add<GUI::ImageWidget>();
m_browser_image->load_from_file("/res/graphics/download-animation.gif"sv);
animation_container.add_spacer().release_value_but_fixme_should_propagate_errors();
animation_container.add_spacer();
auto& source_label = add<GUI::Label>(String::formatted("File: {}", m_url.basename()).release_value_but_fixme_should_propagate_errors());
source_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
@ -102,7 +102,7 @@ DownloadWidget::DownloadWidget(const URL& url)
auto& button_container = add<GUI::Widget>();
button_container.set_layout<GUI::HorizontalBoxLayout>();
button_container.add_spacer().release_value_but_fixme_should_propagate_errors();
button_container.add_spacer();
m_cancel_button = button_container.add<GUI::Button>("Cancel"_string);
m_cancel_button->set_fixed_size(100, 22);
m_cancel_button->on_click = [this](auto) {