mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
Browser: Add download finished graphics to download widget
Not the prettiest, but visually indicates that the download has finished successfully.
This commit is contained in:
parent
29cce65d2f
commit
4faff69974
3 changed files with 6 additions and 2 deletions
|
@ -68,8 +68,8 @@ DownloadWidget::DownloadWidget(const URL& url)
|
|||
animation_container.set_fixed_height(32);
|
||||
auto& animation_layout = animation_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
||||
auto& browser_image = animation_container.add<GUI::ImageWidget>();
|
||||
browser_image.load_from_file("/res/graphics/download-animation.gif");
|
||||
m_browser_image = animation_container.add<GUI::ImageWidget>();
|
||||
m_browser_image->load_from_file("/res/graphics/download-animation.gif");
|
||||
animation_layout.add_spacer();
|
||||
|
||||
auto& source_label = add<GUI::Label>(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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue