Skip to content

Commit 89b5242

Browse files
committed
Adjust Preview Area Heights
1 parent fa84f44 commit 89b5242

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,20 +392,22 @@
392392
<Border Style="{DynamicResource PreviewBorderStyle}" Visibility="{Binding ShowDefaultPreview}">
393393
<Grid
394394
Margin="20,0,10,0"
395-
VerticalAlignment="Top"
395+
VerticalAlignment="Stretch"
396396
Background="Transparent">
397397
<Grid.RowDefinitions>
398-
<RowDefinition Height="Auto" MinHeight="240" />
399398
<RowDefinition Height="*" />
399+
<RowDefinition Height="Auto" />
400400
</Grid.RowDefinitions>
401401
<Grid Grid.Row="0" VerticalAlignment="Center">
402402
<Grid.RowDefinitions>
403403
<RowDefinition Height="Auto" />
404-
<RowDefinition Height="*" />
404+
<RowDefinition Height="Auto" />
405405
</Grid.RowDefinitions>
406406
<TextBlock
407407
x:Name="PreviewGlyphIcon"
408408
Grid.Row="0"
409+
Height="Auto"
410+
Margin="0,16,0,0"
409411
FontFamily="{Binding Glyph.FontFamily}"
410412
Style="{DynamicResource PreviewGlyph}"
411413
Text="{Binding Glyph.Glyph}"
@@ -414,7 +416,7 @@
414416
x:Name="PreviewImageIcon"
415417
Grid.Row="0"
416418
MaxHeight="400"
417-
Margin="0,10,0,4"
419+
Margin="0,16,0,0"
418420
HorizontalAlignment="Center"
419421
Source="{Binding PreviewImage}"
420422
StretchDirection="DownOnly"
@@ -433,13 +435,23 @@
433435
<TextBlock
434436
x:Name="PreviewTitle"
435437
Grid.Row="1"
438+
Margin="0,6,0,16"
436439
HorizontalAlignment="Stretch"
437440
Style="{DynamicResource PreviewItemTitleStyle}"
438441
Text="{Binding Result.Title}"
439442
TextAlignment="Center"
440443
TextWrapping="Wrap" />
441444
</Grid>
442445
<StackPanel Grid.Row="1">
446+
<StackPanel.Style>
447+
<Style TargetType="{x:Type StackPanel}">
448+
<Style.Triggers>
449+
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
450+
<Setter Property="Visibility" Value="Collapsed" />
451+
</DataTrigger>
452+
</Style.Triggers>
453+
</Style>
454+
</StackPanel.Style>
443455
<Separator Style="{DynamicResource PreviewSep}" />
444456
<TextBlock
445457
x:Name="PreviewSubTitle"

Flow.Launcher/Themes/Base.xaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,15 @@
410410
<Setter Property="Foreground" Value="#555555" />
411411
<Setter Property="VerticalAlignment" Value="Center" />
412412
<Setter Property="HorizontalAlignment" Value="Center" />
413-
<Setter Property="FontSize" Value="100" />
413+
<Setter Property="FontSize" Value="128" />
414414
<Setter Property="MaxWidth" Value="128" />
415415
<Setter Property="Height" Value="Auto" />
416416
<Setter Property="MaxHeight" Value="128" />
417+
<Style.Triggers>
418+
<DataTrigger Binding="{Binding ElementName=PreviewGlyphIcon, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
419+
<Setter Property="Visibility" Value="Collapsed" />
420+
</DataTrigger>
421+
</Style.Triggers>
417422
</Style>
418423
<Style
419424
x:Key="PreviewGlyph"

0 commit comments

Comments
 (0)