mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add Auto Hide Preview Separator
This commit is contained in:
parent
5c6244a6ee
commit
6d9135169d
2 changed files with 13 additions and 3 deletions
|
|
@ -409,7 +409,7 @@
|
|||
Source="{Binding PreviewImage}"
|
||||
Visibility="{Binding ShowIcon}" />
|
||||
<TextBlock
|
||||
x:Name="Title"
|
||||
x:Name="PreviewTitle"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource PreviewItemTitleStyle}"
|
||||
Text="{Binding Result.Title}"
|
||||
|
|
@ -417,9 +417,9 @@
|
|||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<Separator Margin="0,15,0,5" Background="{Binding ElementName=MiddleSeparator, Path=Fill}" />
|
||||
<Separator Style="{DynamicResource PreviewSep}" />
|
||||
<TextBlock
|
||||
x:Name="SubTitle"
|
||||
x:Name="PreviewSubTitle"
|
||||
Style="{DynamicResource PreviewItemSubTitleStyle}"
|
||||
Text="{Binding Result.SubTitle}" />
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -406,6 +406,16 @@
|
|||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Margin" Value="0,0,10,10" />
|
||||
</Style>
|
||||
<Style x:Key="PreviewSep" TargetType="{x:Type Separator}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Setter Property="Background" Value="{Binding ElementName=MiddleSeparator, Path=Fill}" />
|
||||
<Setter Property="Margin" Value="0,15,0,5" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue