mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
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. :^)
This commit is contained in:
parent
1cf92d39eb
commit
721b00a83a
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue