From 53b17816c78ce7825dd0c4cbf7d98542949b3bda Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 5 Dec 2022 14:07:35 +0800 Subject: [PATCH] Renaming method and property --- Flow.Launcher.Plugin/Result.cs | 4 ++-- Flow.Launcher/ViewModel/ResultViewModel.cs | 2 +- Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs | 4 ++-- Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 91dcb3336..89965c6c5 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -89,7 +89,7 @@ namespace Flow.Launcher.Plugin /// /// Determines if the preview image should occupy the full width of the preveiw panel. /// - public bool UseBigThumbnail { get; set; } = false; + public bool FullWidthPreview { get; set; } = false; /// /// Delegate function, see @@ -244,7 +244,7 @@ namespace Flow.Launcher.Plugin /// Suggests the preview image of result should use full width of the default preview panel by result's file extension. /// /// File extension. Dot included. - public static bool ShouldUseBigThumbnail(string extension) + public static bool ShouldUseFullWidthPreview(string extension) { return extension is ".jpg" or ".png" diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index 50b9aca21..8889b0321 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -169,7 +169,7 @@ namespace Flow.Launcher.ViewModel /// /// Determines if to use the full width of the preview panel /// - public bool UseBigThumbnail => Result.UseBigThumbnail; + public bool UseBigThumbnail => Result.FullWidthPreview; public GlyphInfo Glyph { get; set; } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index a12747781..e110b58b5 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -205,14 +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)); + bool shouldUseBigThumbnail = Result.ShouldUseFullWidthPreview(Path.GetExtension(filePath)); var result = new Result { Title = Path.GetFileName(filePath), SubTitle = Path.GetDirectoryName(filePath), IcoPath = filePath, PreviewImage = shouldUseBigThumbnail ? filePath : null, - UseBigThumbnail = shouldUseBigThumbnail, + FullWidthPreview = shouldUseBigThumbnail, AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File), TitleHighlightData = StringMatcher.FuzzySearch(query.Search, Path.GetFileName(filePath)).MatchData, Score = score, diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs index 49673d5cd..5dc856b08 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs @@ -406,7 +406,7 @@ namespace Flow.Launcher.Plugin.Program.Programs SubTitle = Main._settings.HideAppsPath ? string.Empty : Location, IcoPath = LogoPath, PreviewImage = PreviewImagePath, - UseBigThumbnail = false, + FullWidthPreview = false, Score = matchResult.Score, TitleHighlightData = matchResult.MatchData, ContextData = this,