diff options
author | Hüseyin ASLITÜRK <asliturk@hotmail.com> | 2020-06-14 11:06:46 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-18 16:35:57 +0200 |
commit | 0a2dc1f5c0f32ac8af19f1260756e6b460d05849 (patch) | |
tree | 510e7c51c7554627c369702eff5b9b331937480c | |
parent | 77c8a960ad35047ea8279414de56d9c2b27d1483 (diff) | |
download | serenity-0a2dc1f5c0f32ac8af19f1260756e6b460d05849.zip |
AboutDialog: Replace Label with Image to show banner and app icon
-rw-r--r-- | Libraries/LibGUI/AboutDialog.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Libraries/LibGUI/AboutDialog.cpp b/Libraries/LibGUI/AboutDialog.cpp index 63eed2d2b8..43d6ca4687 100644 --- a/Libraries/LibGUI/AboutDialog.cpp +++ b/Libraries/LibGUI/AboutDialog.cpp @@ -30,6 +30,7 @@ #include <LibGUI/BoxLayout.h> #include <LibGUI/Button.h> #include <LibGUI/Label.h> +#include <LibGUI/Image.h> #include <LibGUI/Widget.h> #include <LibGfx/Font.h> @@ -52,10 +53,8 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window widget.set_layout<VerticalBoxLayout>(); widget.layout()->set_spacing(0); - auto& banner_label = widget.add<GUI::Label>(); - banner_label.set_icon(Gfx::Bitmap::load_from_file("/res/brand-banner.png")); - banner_label.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); - banner_label.set_preferred_size(banner_label.icon()->size()); + auto& banner_image = widget.add<GUI::Image>(); + banner_image.load_from_file("/res/brand-banner.png"); auto& content_container = widget.add<Widget>(); content_container.set_size_policy(SizePolicy::Fill, SizePolicy::Fill); @@ -73,10 +72,8 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window icon_wrapper.set_preferred_size(32, 48); icon_wrapper.set_layout<VerticalBoxLayout>(); - auto& icon_label = icon_wrapper.add<Label>(); - icon_label.set_icon(m_icon); - icon_label.set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed); - icon_label.set_preferred_size(32, 32); + auto& icon_image = icon_wrapper.add<Image>(); + icon_image.set_bitmap(m_icon); } auto& right_container = content_container.add<Widget>(); |