diff options
author | Linus Groh <mail@linusgroh.de> | 2020-12-25 23:56:44 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-26 01:09:13 +0100 |
commit | 721b00a83a93e54d56d522bae0f6d298639e84ed (patch) | |
tree | a9cd5324cb5dacd9be9961c94962a4dd2accbb6c /Applications/FileManager | |
parent | 1cf92d39ebce21832ad994054ff33a9ce07c8e72 (diff) | |
download | serenity-721b00a83a93e54d56d522bae0f6d298639e84ed.zip |
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. :^)
Diffstat (limited to 'Applications/FileManager')
-rw-r--r-- | Applications/FileManager/DirectoryView.cpp | 6 |
1 files 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 <AK/StringBuilder.h> #include <LibCore/MimeData.h> #include <LibCore/StandardPaths.h> +#include <LibGUI/FileIconProvider.h> #include <LibGUI/InputBox.h> #include <LibGUI/Label.h> #include <LibGUI/MessageBox.h> @@ -45,10 +46,7 @@ namespace FileManager { NonnullRefPtr<GUI::Action> LauncherHandler::create_launch_action(Function<void(const LauncherHandler&)> launch_handler) { - RefPtr<Gfx::Bitmap> 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); }); |