mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Explorer plugin native context menu: item type adjustments
This commit is contained in:
parent
0edd9eafab
commit
deb4f20301
5 changed files with 13 additions and 6 deletions
|
|
@ -247,10 +247,9 @@ namespace Flow.Launcher.Plugin
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item Height Style. Null, Small(for OS Context), Author
|
||||
/// Item Height Style. Null, Small (for displaying the native context menu in the Explorer plugin), Author
|
||||
/// </summary>
|
||||
public string ItemType { get; set; }
|
||||
|
||||
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
|
||||
|
|
|
|||
8
Flow.Launcher.Plugin/ResultItemType.cs
Normal file
8
Flow.Launcher.Plugin/ResultItemType.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace Flow.Launcher.Plugin;
|
||||
|
||||
public enum ResultItemType
|
||||
{
|
||||
Default,
|
||||
Small,
|
||||
Author
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@
|
|||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Result.ItemType}" Value="Small">
|
||||
<Setter Property="Height" Value="{Binding SmallSize}" />
|
||||
<Setter Property="Height" Value="{Binding ItemTypeSmallSize}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="Height" Value="{Binding Settings.ItemHeightSize}" />
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ namespace Flow.Launcher.ViewModel
|
|||
/// </summary>
|
||||
public bool UseBigThumbnail => Result.Preview.IsMedia;
|
||||
|
||||
public double SmallSize => Settings.ItemHeightSize * 0.6;
|
||||
public double ItemTypeSmallSize => Settings.ItemHeightSize * 0.6;
|
||||
|
||||
public GlyphInfo Glyph { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
{
|
||||
Title = menuItem.Label,
|
||||
Icon = () => menuItem.Icon,
|
||||
ItemType = "Small",
|
||||
ItemType = ResultItemType.Small,
|
||||
Action = _ =>
|
||||
{
|
||||
ShellContextMenuDisplayHelper.ExecuteContextMenuItem(record.FullPath, menuItem.CommandId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue