Renaming method and property

This commit is contained in:
Vic 2022-12-05 14:07:35 +08:00
parent 2194e3c5ec
commit 53b17816c7
4 changed files with 6 additions and 6 deletions

View file

@ -89,7 +89,7 @@ namespace Flow.Launcher.Plugin
/// <summary>
/// Determines if the preview image should occupy the full width of the preveiw panel.
/// </summary>
public bool UseBigThumbnail { get; set; } = false;
public bool FullWidthPreview { get; set; } = false;
/// <summary>
/// Delegate function, see <see cref="Icon"/>
@ -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.
/// </summary>
/// <param name="extension">File extension. Dot included.</param>
public static bool ShouldUseBigThumbnail(string extension)
public static bool ShouldUseFullWidthPreview(string extension)
{
return extension is ".jpg"
or ".png"

View file

@ -169,7 +169,7 @@ namespace Flow.Launcher.ViewModel
/// <summary>
/// Determines if to use the full width of the preview panel
/// </summary>
public bool UseBigThumbnail => Result.UseBigThumbnail;
public bool UseBigThumbnail => Result.FullWidthPreview;
public GlyphInfo Glyph { get; set; }

View file

@ -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,

View file

@ -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,