Preview image for explorer

This commit is contained in:
Vic 2022-12-05 13:59:24 +08:00
parent ce2948e1e0
commit 2194e3c5ec

View file

@ -205,11 +205,14 @@ namespace Flow.Launcher.Plugin.Explorer.Search
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false)
{
bool shouldUseBigThumbnail = Result.ShouldUseBigThumbnail(Path.GetExtension(filePath));
var result = new Result
{
Title = Path.GetFileName(filePath),
SubTitle = Path.GetDirectoryName(filePath),
IcoPath = filePath,
PreviewImage = shouldUseBigThumbnail ? filePath : null,
UseBigThumbnail = shouldUseBigThumbnail,
AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File),
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, Path.GetFileName(filePath)).MatchData,
Score = score,