- Adjust Layout

- Change Preview High Resolution
This commit is contained in:
DB p 2022-09-16 16:07:55 +09:00
parent ea728ccc7d
commit b502f2af1b
2 changed files with 7 additions and 6 deletions

View file

@ -313,7 +313,7 @@
Visibility="Collapsed">
<Border Style="{DynamicResource PreviewBorderStyle}" Visibility="{Binding ShowDefaultPreview}">
<Grid
Margin="10,0,10,0"
Margin="20,0,10,0"
VerticalAlignment="Center"
Background="Transparent">
<Grid.RowDefinitions>
@ -325,8 +325,9 @@
x:Name="ImageIcon"
Grid.Row="0"
Grid.Column="0"
Height="128"
Margin="0,0,0,8"
MaxWidth="{Binding ActualWidth, ElementName=Preview}"
MaxHeight="400"
Margin="0,10,0,8"
HorizontalAlignment="Center"
Source="{Binding PreviewImage}"
Visibility="{Binding ShowIcon}" />
@ -343,10 +344,10 @@
<TextBlock
x:Name="SubTitle"
Grid.Row="2"
Margin="0,12,0,0"
Margin="0,2,0,10"
HorizontalAlignment="Stretch"
FontSize="13"
LineHeight="22"
LineHeight="18"
Style="{DynamicResource ItemSubTitleStyle}"
Text="{Binding Result.SubTitle}"
TextAlignment="Center"

View file

@ -190,7 +190,7 @@ namespace Flow.Launcher.ViewModel
var imagePath = Result.PreviewImage ?? Result.IcoPath;
// We need to modify the property not field here to trigger the OnPropertyChanged event
//PreviewImage = await Task.Run(() => ImageLoader.Load(imagePath, true)).ConfigureAwait(false);
PreviewImage = ShellFile.FromFilePath(imagePath).Thumbnail.LargeBitmapSource;
PreviewImage = ShellFile.FromFilePath(imagePath).Thumbnail.ExtraLargeBitmapSource;
}
public Result Result { get; }