mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Explorer plugin native context menu: some code simplifications
This commit is contained in:
parent
c42fbfd185
commit
ab4f78feff
2 changed files with 5 additions and 23 deletions
|
|
@ -223,26 +223,11 @@
|
|||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Style.Triggers>
|
||||
<!-- Condition for Type being 'Small' -->
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding Result.ItemType}" Value="Small" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.Setters>
|
||||
<Setter Property="Height" Value="{Binding SmallSize}" />
|
||||
</MultiDataTrigger.Setters>
|
||||
</MultiDataTrigger>
|
||||
<!-- Default condition for Type being other values or not set -->
|
||||
<DataTrigger Binding="{Binding Result.ItemType}" Value="{x:Null}">
|
||||
<Setter Property="Height" Value="{Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Result.ItemType}" Value="">
|
||||
<Setter Property="Height" Value="{Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Result.ItemType}" Value="author">
|
||||
<Setter Property="Height" Value="{Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<DataTrigger Binding="{Binding Result.ItemType}" Value="Small">
|
||||
<Setter Property="Height" Value="{Binding SmallSize}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="Height" Value="{Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<EventSetter Event="MouseEnter" Handler="OnMouseEnter" />
|
||||
<EventSetter Event="MouseMove" Handler="OnMouseMove" />
|
||||
|
|
@ -279,4 +264,4 @@
|
|||
</Style>
|
||||
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</ListBox>
|
||||
|
|
|
|||
|
|
@ -180,10 +180,7 @@ namespace Flow.Launcher.ViewModel
|
|||
/// </summary>
|
||||
public bool UseBigThumbnail => Result.Preview.IsMedia;
|
||||
|
||||
public double SmallSize
|
||||
{
|
||||
get { return Settings.ItemHeightSize * 0.6; }
|
||||
}
|
||||
public double SmallSize => Settings.ItemHeightSize * 0.6;
|
||||
|
||||
public GlyphInfo Glyph { get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue