Native context menu: remove ItemType property from Result

This commit is contained in:
Yusyuriv 2024-06-17 14:20:35 +06:00
parent 53188c31a1
commit 08356adb89
No known key found for this signature in database
GPG key ID: A91C52E6F73148E0
5 changed files with 0 additions and 22 deletions

View file

@ -246,11 +246,6 @@ namespace Flow.Launcher.Plugin
return AsyncAction?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
}
/// <summary>
/// Item Height Style. Null, Small (for displaying the native context menu in the Explorer plugin), Author
/// </summary>
public ResultItemType ItemType { get; set; }
/// <summary>
/// Progress bar display. Providing an int value between 0-100 will trigger the progress bar to be displayed on the result
/// </summary>

View file

@ -1,8 +0,0 @@
namespace Flow.Launcher.Plugin;
public enum ResultItemType
{
Default,
Small,
Author
}

View file

@ -222,11 +222,6 @@
<!-- http://stackoverflow.com/questions/16819577/setting-background-color-or-wpf-4-0-listbox-windows-8/#16820062 -->
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Style.Triggers>
<DataTrigger Binding="{Binding Result.ItemType}" Value="Small">
<Setter Property="Height" Value="{Binding ItemTypeSmallSize}" />
</DataTrigger>
</Style.Triggers>
<Setter Property="Height" Value="{Binding Settings.ItemHeightSize}" />
<Setter Property="Visibility" Value="Visible" />
<EventSetter Event="MouseEnter" Handler="OnMouseEnter" />
@ -262,6 +257,5 @@
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>

View file

@ -180,8 +180,6 @@ namespace Flow.Launcher.ViewModel
/// </summary>
public bool UseBigThumbnail => Result.Preview.IsMedia;
public double ItemTypeSmallSize => Settings.ItemHeightSize * 0.6;
public GlyphInfo Glyph { get; set; }
private async Task<ImageSource> LoadImageInternalAsync(string imagePath, Result.IconDelegate icon, bool loadFullImage)

View file

@ -284,7 +284,6 @@ namespace Flow.Launcher.Plugin.Explorer
{
Title = menuItem.Label,
Icon = () => menuItem.Icon,
ItemType = ResultItemType.Small,
Action = _ =>
{
ShellContextMenuDisplayHelper.ExecuteContextMenuItem(record.FullPath, menuItem.CommandId);