Skip to content

Commit

Permalink
Feature: Redesigned the way details are displayed in the details pane (
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 authored Jun 28, 2023
1 parent ef111ff commit d97f3e1
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/Files.App/UserControls/Pane/PreviewPane.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@
</Setter>
</Style>

<Style
x:Key="Local.FileDetailsHeaderTextBlockStyle"
BasedOn="{StaticResource CaptionTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Foreground" Value="{ThemeResource TextFillColorTertiaryBrush}" />
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
</Style>

<Style x:Key="Local.FileDetailsTextBlockStyle" TargetType="TextBlock">
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
Expand Down Expand Up @@ -231,33 +240,32 @@
Visibility="Collapsed">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="properties:FileProperty">
<Grid
<StackPanel
Padding="0,8,0,8"
HorizontalAlignment="Stretch"
AutomationProperties.Name="{x:Bind Name, Mode=OneWay}"
ColumnSpacing="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
Orientation="Vertical"
Spacing="4">

<!-- Property -->
<TextBlock
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
MaxLines="2"
Style="{StaticResource Local.FileDetailsTextBlockStyle}"
Style="{StaticResource Local.FileDetailsHeaderTextBlockStyle}"
Text="{x:Bind Name, Mode=OneWay}" />

<!-- Value -->
<TextBox
<TextBlock
x:Name="PropertyValueTemplateTextBox"
Grid.Column="1"
MaxHeight="50"
HorizontalAlignment="Stretch"
Background="Transparent"
BorderBrush="Transparent"
IsTextSelectionEnabled="True"
MaxLines="2"
Style="{StaticResource Local.FileDetailsTextBlockStyle}"
Text="{x:Bind ValueText, Mode=TwoWay}"
TextWrapping="Wrap" />
</Grid>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Expand Down

0 comments on commit d97f3e1

Please sign in to comment.