From bb0c57d3d2fadd70d5925d6636f59e5116fb8265 Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 16 Sep 2022 20:33:54 +0900 Subject: [PATCH] - remove test customcontrol in program plugin - change small icon in result to folder thumbnail --- Flow.Launcher/ViewModel/ResultViewModel.cs | 5 +++-- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 9 --------- Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs | 4 ++-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index 2ea116029..2ccf3b416 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -181,7 +181,8 @@ namespace Flow.Launcher.ViewModel } // We need to modify the property not field here to trigger the OnPropertyChanged event - Image = await Task.Run(() => ImageLoader.Load(imagePath)).ConfigureAwait(false); + //Image = await Task.Run(() => ImageLoader.Load(imagePath)).ConfigureAwait(false); + Image = ShellFolder.FromParsingName(imagePath).Thumbnail.MediumBitmapSource; } @@ -190,7 +191,7 @@ namespace Flow.Launcher.ViewModel var imagePath = Result.PreviewImage ?? Result.IcoPath; // We need to modify the property not field here to trigger the OnPropertyChanged event //PreviewImage = await Task.Run(() => ImageLoader.Load(imagePath, true)).ConfigureAwait(false); - PreviewImage = ShellFile.FromFilePath(imagePath).Thumbnail.ExtraLargeBitmapSource; + PreviewImage = ShellFolder.FromParsingName(imagePath).Thumbnail.LargeBitmapSource; } public Result Result { get; } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 812bb01a0..64a40954c 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -105,15 +105,6 @@ namespace Flow.Launcher.Plugin.Program.Programs Score = matchResult.Score, TitleHighlightData = matchResult.MatchData, ContextData = this, - PreviewPanel = new Lazy(() => - { - var control = new UserControl(); - control.Content = new TextBlock() - { - Text = "test" - }; - return control; - }), Action = c => { var runAsAdmin = ( diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs index b136e3b8b..179745e2d 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -192,4 +192,4 @@ namespace Flow.Launcher.Plugin.WebSearch public event ResultUpdatedEventHandler ResultsUpdated; } -} \ No newline at end of file +}