summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHüseyin ASLITÜRK <asliturk@hotmail.com>2020-06-17 21:50:39 +0300
committerAndreas Kling <kling@serenityos.org>2020-06-18 16:35:57 +0200
commitdb5b28b78ef64ab28eee7bc3f237241223e31f20 (patch)
tree2648d13c8dd7a4025a531b8d122cd03c5e51c57a
parentd139df706a5d900f73ddbaf4f6b219591eb7e7d1 (diff)
downloadserenity-db5b28b78ef64ab28eee7bc3f237241223e31f20.zip
DownloadWidget: Use GUI::Image instead of Label to show image
-rw-r--r--Applications/Browser/DownloadWidget.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/Applications/Browser/DownloadWidget.cpp b/Applications/Browser/DownloadWidget.cpp
index 69d53f9c7d..5a4fe9a021 100644
--- a/Applications/Browser/DownloadWidget.cpp
+++ b/Applications/Browser/DownloadWidget.cpp
@@ -33,6 +33,7 @@
#include <LibDesktop/Launcher.h>
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
+#include <LibGUI/Image.h>
#include <LibGUI/Label.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/ProgressBar.h>
@@ -72,15 +73,11 @@ DownloadWidget::DownloadWidget(const URL& url)
animation_container.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
animation_container.set_preferred_size(0, 32);
auto& animation_layout = animation_container.set_layout<GUI::HorizontalBoxLayout>();
- auto& browser_icon_label = animation_container.add<GUI::Label>();
- browser_icon_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-browser.png"));
- browser_icon_label.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
- browser_icon_label.set_preferred_size(32, 32);
+
+ auto& browser_image = animation_container.add<GUI::Image>();
+ browser_image.load_from_file("/res/download-animation.gif");
animation_layout.add_spacer();
- auto& folder_icon_label = animation_container.add<GUI::Label>();
- folder_icon_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-folder.png"));
- folder_icon_label.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
- folder_icon_label.set_preferred_size(32, 32);
+
auto& source_label = add<GUI::Label>(String::format("From: %s", url.to_string().characters()));
source_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);