diff --git a/Base/res/graphics/download-finished.gif b/Base/res/graphics/download-finished.gif new file mode 100644 index 0000000000..5bb54ea94f Binary files /dev/null and b/Base/res/graphics/download-finished.gif differ diff --git a/Userland/Applications/Browser/DownloadWidget.cpp b/Userland/Applications/Browser/DownloadWidget.cpp index a9a9b17cc5..f46b113c76 100644 --- a/Userland/Applications/Browser/DownloadWidget.cpp +++ b/Userland/Applications/Browser/DownloadWidget.cpp @@ -68,8 +68,8 @@ DownloadWidget::DownloadWidget(const URL& url) animation_container.set_fixed_height(32); auto& animation_layout = animation_container.set_layout(); - auto& browser_image = animation_container.add(); - browser_image.load_from_file("/res/graphics/download-animation.gif"); + m_browser_image = animation_container.add(); + m_browser_image->load_from_file("/res/graphics/download-animation.gif"); animation_layout.add_spacer(); auto& source_label = add(String::formatted("From: {}", url)); @@ -156,6 +156,8 @@ void DownloadWidget::did_finish(bool success) { dbgln("did_finish, success={}", success); + m_browser_image->load_from_file("/res/graphics/download-finished.gif"); + window()->set_title("Download finished!"); m_close_button->set_enabled(true); m_cancel_button->set_text("Open in Folder"); m_cancel_button->on_click = [this](auto) { diff --git a/Userland/Applications/Browser/DownloadWidget.h b/Userland/Applications/Browser/DownloadWidget.h index 37da49801f..7d544eb9e4 100644 --- a/Userland/Applications/Browser/DownloadWidget.h +++ b/Userland/Applications/Browser/DownloadWidget.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,7 @@ private: RefPtr m_cancel_button; RefPtr m_close_button; RefPtr m_close_on_finish_checkbox; + RefPtr m_browser_image; OwnPtr m_output_file_stream; Core::ElapsedTimer m_elapsed_timer; };