Skip to content

Commit

Permalink
Use single TextBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrariofilippo committed Nov 24, 2024
1 parent 4926a33 commit 2a90e9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
37 changes: 12 additions & 25 deletions src/Files.App/UserControls/Pane/InfoPane.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,33 +240,20 @@
Visibility="Collapsed" />

<!-- Drive Details -->
<StackPanel
x:Name="DriveFormatAndType"
<TextBlock
x:Name="DriveFormatAndTypeTextBlock"
Margin="12,12,12,24"
HorizontalAlignment="Center"
Orientation="Horizontal"
Spacing="8"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
IsTextSelectionEnabled="True"
TextAlignment="Center"
TextWrapping="Wrap"
Visibility="Collapsed">
<TextBlock
x:Name="DriveFormatTextBox"
HorizontalAlignment="Center"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.SelectedDriveItem.Filesystem, Mode=OneWay}"
TextAlignment="Center"
TextWrapping="Wrap" />
<TextBlock
x:Name="DriveTypeTextBox"
HorizontalAlignment="Center"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.SelectedDriveItem.TypeText, Mode=OneWay}"
TextAlignment="Center"
TextWrapping="Wrap" />
</StackPanel>
<Run Text="{x:Bind ViewModel.SelectedDriveItem.Filesystem, Mode=OneWay}" />
<Run Text=" " />
<Run Foreground="{ThemeResource TextFillColorTertiaryBrush}" Text="{x:Bind ViewModel.SelectedDriveItem.TypeText, Mode=OneWay}" />
</TextBlock>

<TextBlock
x:Name="UsedSpaceTextBox"
Expand Down Expand Up @@ -584,7 +571,7 @@
<Setter Target="DetailsOpenProperties.Visibility" Value="Visible" />
<Setter Target="PreviewControlPresenter.Visibility" Value="Visible" />
<Setter Target="DetailsListHeader.Visibility" Value="Visible" />
<Setter Target="DriveFormatAndType.Visibility" Value="Visible" />
<Setter Target="DriveFormatAndTypeTextBlock.Visibility" Value="Visible" />
<Setter Target="UsedSpaceTextBox.Visibility" Value="Visible" />
<Setter Target="DriveSpaceProgressBar.Visibility" Value="Visible" />
<Setter Target="DriveSpaceGrid.Visibility" Value="Visible" />
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/ViewModels/UserControls/InfoPaneViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ private async Task LoadBasicPreviewAsync()
await basicModel.LoadAsync();

PreviewPaneContent = new BasicPreview(basicModel);
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DrivePreviewAndDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DriveStorageDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
}
catch (Exception ex)
{
Expand Down

0 comments on commit 2a90e9c

Please sign in to comment.