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
Notes: sideshowbarker 2024-07-18 11:03:02 +09:00

View File

@ -114,7 +114,7 @@ void CalculatorProvider::query(String const& query, Function<void(NonnullRefPtrV
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)