mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix file info in preview panel of explorer plugin disappearing when file size display is disabled
This commit is contained in:
parent
5b561f4dce
commit
abb0c02dfe
2 changed files with 13 additions and 14 deletions
|
|
@ -54,20 +54,12 @@
|
|||
<TextBlock
|
||||
Style="{DynamicResource PreviewItemSubTitleStyle}"
|
||||
Text="{Binding Result.SubTitle}" />
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel.Style>
|
||||
<Style TargetType="StackPanel">
|
||||
<Style.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding ElementName=SizeValue, Path=Text}"
|
||||
Value="{x:Static sys:String.Empty}">
|
||||
<Setter Property="Height" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<StackPanel
|
||||
Visibility="{Binding FileInfoVisibility, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}">
|
||||
|
||||
<Separator Margin="0" Style="{DynamicResource PreviewSep}" />
|
||||
<Grid Margin="0 10 0 0" VerticalAlignment="Center">
|
||||
|
||||
<Grid Margin="0 10 0 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="*" />
|
||||
|
|
@ -77,6 +69,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
|
|
@ -87,7 +80,6 @@
|
|||
Text="{DynamicResource FileSize}"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock
|
||||
Name="SizeValue"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
|
|||
? Visibility.Visible
|
||||
: Visibility.Collapsed;
|
||||
|
||||
public Visibility FileInfoVisibility =>
|
||||
Settings.ShowFileSizeInPreviewPanel ||
|
||||
Settings.ShowCreatedDateInPreviewPanel ||
|
||||
Settings.ShowModifiedDateInPreviewPanel
|
||||
? Visibility.Visible
|
||||
: Visibility.Collapsed;
|
||||
|
||||
public PreviewPanel(Settings settings, string filePath)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
|
|
|||
Loading…
Reference in a new issue