1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:47:46 +00:00

Assistant: Use FileIconProvider for FileProvider query results

Instead of showing the default "folder" icon for all file results,
we now show an appropriate icon for the given file. :^)
This commit is contained in:
Andreas Kling 2021-07-03 17:48:08 +02:00
parent 513e67e2eb
commit d640031214

View file

@ -114,7 +114,7 @@ void CalculatorProvider::query(String const& query, Function<void(NonnullRefPtrV
Gfx::Bitmap const* FileResult::bitmap() const Gfx::Bitmap const* FileResult::bitmap() const
{ {
return GUI::Icon::default_icon("filetype-folder").bitmap_for_size(16); return GUI::FileIconProvider::icon_for_path(title()).bitmap_for_size(16);
} }
void FileProvider::query(const String& query, Function<void(NonnullRefPtrVector<Result>)> on_complete) void FileProvider::query(const String& query, Function<void(NonnullRefPtrVector<Result>)> on_complete)