mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Treat the preview panel height equal to the resultlist height
- Modify the image width to fit in the preview area if it is a media file
This commit is contained in:
parent
3ae438aba2
commit
105515eecb
2 changed files with 18 additions and 7 deletions
|
|
@ -514,6 +514,7 @@
|
|||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}"
|
||||
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
|
||||
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
|
||||
Style="{DynamicResource PreviewBorderStyle}"
|
||||
|
|
|
|||
|
|
@ -13,23 +13,21 @@
|
|||
Margin="20 0 10 0"
|
||||
VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center">
|
||||
<Image
|
||||
Margin="0 16 0 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Source="{Binding PreviewImage, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"
|
||||
StretchDirection="DownOnly">
|
||||
Stretch="Uniform">
|
||||
<Image.Style>
|
||||
<Style TargetType="Image">
|
||||
<Setter Property="MaxWidth" Value="96" />
|
||||
<Setter Property="MaxHeight" Value="320" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding UseBigThumbnail}" Value="True">
|
||||
<Setter Property="Width" Value="{Binding ElementName=PreviewGrid, Path=ActualWidth}" />
|
||||
<Setter Property="MaxWidth" Value="{Binding ElementName=PreviewGrid, Path=ActualWidth}" />
|
||||
<Setter Property="MaxHeight" Value="{Binding ElementName=PreviewGrid, Path=ActualHeight}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
|
@ -53,8 +51,20 @@
|
|||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<Separator />
|
||||
<TextBlock Style="{DynamicResource PreviewItemSubTitleStyle}" Text="{Binding Result.SubTitle}" />
|
||||
<Rectangle
|
||||
Width="Auto"
|
||||
Margin="0 0 0 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource SeparatorStyle}" />
|
||||
<TextBlock
|
||||
Margin="0 8 0 8"
|
||||
Style="{DynamicResource PreviewItemSubTitleStyle}"
|
||||
Text="{Binding Result.SubTitle}" />
|
||||
<Rectangle
|
||||
Width="Auto"
|
||||
Margin="0 0 0 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource SeparatorStyle}" />
|
||||
<StackPanel Visibility="{Binding FileInfoVisibility, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}">
|
||||
<Grid Margin="0 10 0 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
|
|
|||
Loading…
Reference in a new issue