mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Rename var
This commit is contained in:
parent
06e5ec45f7
commit
a2b2e89272
2 changed files with 6 additions and 3 deletions
|
|
@ -423,7 +423,7 @@
|
||||||
<Style TargetType="{x:Type Image}">
|
<Style TargetType="{x:Type Image}">
|
||||||
<Setter Property="MaxWidth" Value="128" />
|
<Setter Property="MaxWidth" Value="128" />
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding PreviewIsImageOrVideo}" Value="True">
|
<DataTrigger Binding="{Binding UseBigThumbnail}" Value="True">
|
||||||
<Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" />
|
<Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" />
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace Flow.Launcher.ViewModel
|
||||||
if (!string.IsNullOrEmpty(extension))
|
if (!string.IsNullOrEmpty(extension))
|
||||||
{
|
{
|
||||||
// only when explicitly specified PreviewImage
|
// only when explicitly specified PreviewImage
|
||||||
PreviewIsImageOrVideo = IsMedia(extension.ToLowerInvariant());
|
UseBigThumbnail = IsMedia(extension.ToLowerInvariant());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Result.Glyph is { FontFamily: not null } glyph)
|
if (Result.Glyph is { FontFamily: not null } glyph)
|
||||||
|
|
@ -174,7 +174,10 @@ namespace Flow.Launcher.ViewModel
|
||||||
private set => previewImage = value;
|
private set => previewImage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool PreviewIsImageOrVideo { get; set; } = false;
|
/// <summary>
|
||||||
|
/// Determines if to use the full width of the preview panel
|
||||||
|
/// </summary>
|
||||||
|
public bool UseBigThumbnail { get; set; } = false;
|
||||||
|
|
||||||
public static bool IsMedia(string extension)
|
public static bool IsMedia(string extension)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue