diff options
author | Hüseyin ASLITÜRK <asliturk@hotmail.com> | 2020-06-14 11:07:02 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-18 16:35:57 +0200 |
commit | 77c8a960ad35047ea8279414de56d9c2b27d1483 (patch) | |
tree | f69f8c772ef09f838e81fee371d37e7a59fa8097 /Services/NotificationServer | |
parent | 030d0f9937e8168b0df3e1f8adcccf0f0d2915a9 (diff) | |
download | serenity-77c8a960ad35047ea8279414de56d9c2b27d1483.zip |
NotificationWindow: Replace Label with Image component to show icons
Diffstat (limited to 'Services/NotificationServer')
-rw-r--r-- | Services/NotificationServer/NotificationWindow.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Services/NotificationServer/NotificationWindow.cpp b/Services/NotificationServer/NotificationWindow.cpp index 8f4a1c8b55..35c31e3699 100644 --- a/Services/NotificationServer/NotificationWindow.cpp +++ b/Services/NotificationServer/NotificationWindow.cpp @@ -30,6 +30,7 @@ #include <LibGUI/Button.h> #include <LibGUI/Desktop.h> #include <LibGUI/Label.h> +#include <LibGUI/Image.h> #include <LibGUI/Widget.h> #include <LibGfx/Bitmap.h> #include <LibGfx/Font.h> @@ -90,10 +91,8 @@ NotificationWindow::NotificationWindow(const String& text, const String& title, widget.layout()->set_spacing(6); if (icon.is_valid()) { - auto& icon_label = widget.add<GUI::Label>(); - icon_label.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); - icon_label.set_preferred_size(32, 32); - icon_label.set_icon(icon.bitmap()); + auto& image = widget.add<GUI::Image>(); + image.set_bitmap(icon.bitmap()); } auto& left_container = widget.add<GUI::Widget>(); |