From 721b00a83a93e54d56d522bae0f6d298639e84ed Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 25 Dec 2020 23:56:44 +0100 Subject: [PATCH] FileManager: Fix missing launch action icons I missed this when updating everything to use GUI::FileIconProvider rather than loading icons from .af files, it broke as a result as none of them have icon info anymore. :^) --- Applications/FileManager/DirectoryView.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Applications/FileManager/DirectoryView.cpp b/Applications/FileManager/DirectoryView.cpp index c2f1beebba..fbf113a3b2 100644 --- a/Applications/FileManager/DirectoryView.cpp +++ b/Applications/FileManager/DirectoryView.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -45,10 +46,7 @@ namespace FileManager { NonnullRefPtr LauncherHandler::create_launch_action(Function launch_handler) { - RefPtr icon; - auto icon_file = details().icons.get("16x16"); - if (icon_file.has_value()) - icon = Gfx::Bitmap::load_from_file(icon_file.value()); + auto icon = GUI::FileIconProvider::icon_for_path(details().executable).bitmap_for_size(16); return GUI::Action::create(details().name, move(icon), [this, launch_handler = move(launch_handler)](auto&) { launch_handler(*this); });