From c7e72a52a3f3b7b2e2fbae5edbd4743bcfbc6b35 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Wed, 4 Aug 2021 11:57:13 +0200 Subject: [PATCH] Taskbar: Use provided AppFile icon instead of finding it ourselves --- Userland/Services/Taskbar/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index b8c15f5ab37..f46eb552ac7 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 g_apps; @@ -91,7 +92,7 @@ Vector discover_apps_and_categories() HashTable 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 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)