summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-08-04 11:57:13 +0200
committerLinus Groh <mail@linusgroh.de>2021-08-04 13:54:08 +0100
commitc7e72a52a3f3b7b2e2fbae5edbd4743bcfbc6b35 (patch)
treeaaeb79499567d8bbacff209d0324501a34bea945 /Userland/Services/Taskbar
parent8493477cc71f4be6a4336d3e3830eed5e3f74c55 (diff)
downloadserenity-c7e72a52a3f3b7b2e2fbae5edbd4743bcfbc6b35.zip
Taskbar: Use provided AppFile icon instead of finding it ourselves
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r--Userland/Services/Taskbar/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp
index b8c15f5ab3..f46eb552ac 100644
--- a/Userland/Services/Taskbar/main.cpp
+++ b/Userland/Services/Taskbar/main.cpp
@@ -71,6 +71,7 @@ struct AppMetadata {
String executable;
String name;
String category;
+ GUI::Icon icon;
bool run_in_terminal;
};
Vector<AppMetadata> g_apps;
@@ -91,7 +92,7 @@ Vector<String> discover_apps_and_categories()
HashTable<String> seen_app_categories;
Desktop::AppFile::for_each([&](auto af) {
if (access(af->executable().characters(), X_OK) == 0) {
- g_apps.append({ af->executable(), af->name(), af->category(), af->run_in_terminal() });
+ g_apps.append({ af->executable(), af->name(), af->category(), af->icon(), af->run_in_terminal() });
seen_app_categories.set(af->category());
}
});
@@ -172,7 +173,7 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
continue;
}
- auto icon = GUI::FileIconProvider::icon_for_executable(app.executable).bitmap_for_size(16);
+ auto icon = app.icon.bitmap_for_size(16);
if constexpr (SYSTEM_MENU_DEBUG) {
if (icon)