Skip to content

Feature: Settings dialog update #12112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/Files.App/Dialogs/SettingsDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

<x:Double x:Key="ContentDialogMaxWidth">1100</x:Double>
<Thickness x:Key="ContentDialogPadding">0</Thickness>
<SolidColorBrush x:Key="NavigationViewContentGridBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Transparent" />
</ResourceDictionary>
</ContentDialog.Resources>

Expand All @@ -31,6 +33,14 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<!-- Smokescreen for displaying a semi transparent background -->
<Border
Grid.RowSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{ThemeResource App.Theme.BackgroundBrush}"
Opacity=".4" />

<!-- Titlebar -->
<Grid Grid.Row="0" Padding="8,0">
<TextBlock
Expand Down Expand Up @@ -130,10 +140,7 @@

<!-- Content Frame -->
<ScrollViewer x:Name="SettingsContentScrollViewer">
<Frame
x:Name="SettingsContentFrame"
Padding="12"
Background="{ThemeResource SolidBackgroundFillColorTertiary}" />
<Frame x:Name="SettingsContentFrame" Padding="4,0,24,24" />
</ScrollViewer>

</NavigationView>
Expand Down
12 changes: 0 additions & 12 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,6 @@
<data name="InvalidItemDialogTitle" xml:space="preserve">
<value>Invalid item</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version</value>
</data>
<data name="SettingsAboutVersionTitle" xml:space="preserve">
<value>Version:</value>
</data>
Expand Down Expand Up @@ -612,12 +609,6 @@
<data name="SponsorUsOnGitHub" xml:space="preserve">
<value>Sponsor us on GitHub</value>
</data>
<data name="Personalization" xml:space="preserve">
<value>Personalization</value>
</data>
<data name="LayoutAndSorting" xml:space="preserve">
<value>Layout and sorting</value>
</data>
<data name="AccessDeniedCreateDialog.Text" xml:space="preserve">
<value>We weren't able to create this item</value>
</data>
Expand Down Expand Up @@ -1983,9 +1974,6 @@
<data name="ImportSettings" xml:space="preserve">
<value>Import Settings</value>
</data>
<data name="ManageSettings" xml:space="preserve">
<value>Manage settings</value>
</data>
<data name="SettingsImportErrorDescription" xml:space="preserve">
<value>Couldn't import settings. The settings file is corrupted.</value>
</data>
Expand Down
18 changes: 9 additions & 9 deletions src/Files.App/Views/LayoutModes/ColumnViewBase.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
Canvas.ZIndex="0"
EmptyTextType="{x:Bind ParentShellPageInstance.FilesystemViewModel.EmptyTextType, Mode=OneWay}" />

<!-- Invalid Item Name Tip -->
<!-- Invalid Item Name Tip -->
<TeachingTip
x:Name="FileNameTeachingTip"
Grid.RowSpan="2"
Expand All @@ -149,7 +149,7 @@
ViewChangeStarted="SemanticZoom_ViewChangeStarted"
Visibility="{x:Bind FolderSettings.IsLayoutModeChanging, Mode=OneWay, Converter={StaticResource NegatedBoolToVisibilityConverter}}">

<!-- Main View -->
<!-- Main View -->
<SemanticZoom.ZoomedInView>
<ListView
x:Name="FileList"
Expand Down Expand Up @@ -199,7 +199,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<!-- Thumbnail -->
<!-- Thumbnail -->
<Grid
Grid.Column="0"
Width="24"
Expand Down Expand Up @@ -274,7 +274,7 @@
Stretch="Uniform" />
</Grid>

<!-- Item Name -->
<!-- Item Name -->
<TextBlock
x:Name="ItemName"
Grid.Column="1"
Expand All @@ -301,7 +301,7 @@
<Grid Grid.Column="2">
<StackPanel Orientation="Horizontal" Spacing="4">

<!-- Cloud Status -->
<!-- Cloud Status -->
<FontIcon
x:Name="CloudDriveSyncStatusGlyph"
HorizontalAlignment="Center"
Expand Down Expand Up @@ -402,7 +402,7 @@
</ListView>
</SemanticZoom.ZoomedInView>

<!-- Grouped View -->
<!-- Grouped View -->
<SemanticZoom.ZoomedOutView>
<ListView
HorizontalAlignment="Stretch"
Expand Down Expand Up @@ -438,7 +438,7 @@
Style="{StaticResource SubtitleTextBlockStyle}"
Text="{x:Bind ((helpers:IGroupedCollectionHeader)Group).Model.Text, Mode=OneWay}" />

<!-- Count -->
<!-- Count -->
<TextBlock
Margin="4,0,0,0"
VerticalAlignment="Center"
Expand All @@ -447,7 +447,7 @@
Text="{x:Bind ((helpers:IGroupedCollectionHeader)Group).Model.CountText, Mode=OneWay}"
Visibility="{x:Bind ((helpers:IGroupedCollectionHeader)Group).Model.ShowCountTextBelow, Mode=OneWay, Converter={StaticResource NegatedBoolToVisibilityConverter}}" />

<!-- Subheader -->
<!-- Subheader -->
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Expand All @@ -474,7 +474,7 @@

</SemanticZoom>

<!-- Selector -->
<!-- Selector -->
<Canvas>
<Rectangle
Name="SelectionRectangle"
Expand Down
68 changes: 37 additions & 31 deletions src/Files.App/Views/Properties/HashesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,36 +75,42 @@
<FontIcon FontSize="14" Glyph="&#xE7B3;" />
<Button.Flyout>
<MenuFlyout x:Name="SelectAlgorithmsMenuFlyout" Closing="MenuFlyout_Closing">
<ToggleMenuFlyoutItem Text="CRC32"
IsChecked="{x:Bind HashesViewModel.ShowHashes['CRC32']}"
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="CRC32" />
<ToggleMenuFlyoutItem Text="MD5"
IsChecked="{x:Bind HashesViewModel.ShowHashes['MD5']}"
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="MD5" />
<ToggleMenuFlyoutItem Text="SHA1"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA1']}"
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA1" />
<ToggleMenuFlyoutItem Text="SHA256"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA256']}"
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA256" />
<ToggleMenuFlyoutItem Text="SHA384"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA384']}"
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA384" />
<ToggleMenuFlyoutItem Text="SHA512"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA512']}"
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA512" />
<ToggleMenuFlyoutItem
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="CRC32"
IsChecked="{x:Bind HashesViewModel.ShowHashes['CRC32']}"
Text="CRC32" />
<ToggleMenuFlyoutItem
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="MD5"
IsChecked="{x:Bind HashesViewModel.ShowHashes['MD5']}"
Text="MD5" />
<ToggleMenuFlyoutItem
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA1"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA1']}"
Text="SHA1" />
<ToggleMenuFlyoutItem
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA256"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA256']}"
Text="SHA256" />
<ToggleMenuFlyoutItem
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA384"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA384']}"
Text="SHA384" />
<ToggleMenuFlyoutItem
Click="ToggleMenuFlyoutItem_Click"
Command="{x:Bind HashesViewModel.ToggleIsEnabledCommand}"
CommandParameter="SHA512"
IsChecked="{x:Bind HashesViewModel.ShowHashes['SHA512']}"
Text="SHA512" />
</MenuFlyout>
</Button.Flyout>
</Button>
Expand Down Expand Up @@ -142,9 +148,9 @@
<!-- Copy button -->
<Button
x:Name="CopyHashButton"
x:Load="{x:Bind IsCalculated, Mode=OneWay}"
Grid.Column="3"
Padding="6"
x:Load="{x:Bind IsCalculated, Mode=OneWay}"
AutomationProperties.Name="{helpers:ResourceString Name=Copy}"
Background="Transparent"
BorderBrush="Transparent"
Expand Down
17 changes: 9 additions & 8 deletions src/Files.App/Views/Settings/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
<EntranceThemeTransition />
</TransitionCollection>
</StackPanel.ChildrenTransitions>
<!-- Version -->

<!-- Title -->
<TextBlock
Padding="0,0,0,4"
FontSize="14"
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=Version}" />
Text="{helpers:ResourceString Name=About}" />

<!-- App Info -->
<local:SettingsBlockControl
Expand Down Expand Up @@ -67,8 +68,8 @@

<!-- Help and support -->
<TextBlock
Padding="0,12,0,4"
FontSize="14"
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=HelpAndSupport}" />

Expand Down Expand Up @@ -141,8 +142,8 @@

<!-- Open Source -->
<TextBlock
Padding="0,12,0,4"
FontSize="14"
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=OpenSource}" />

Expand Down
12 changes: 6 additions & 6 deletions src/Files.App/Views/Settings/AdvancedPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
</TransitionCollection>
</StackPanel.ChildrenTransitions>

<!-- Manage Settings -->
<!-- Title -->
<TextBlock
Padding="0,0,0,4"
FontSize="14"
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=ManageSettings}" />
Text="{helpers:ResourceString Name=Advanced}" />

<!-- Export -->
<local:SettingsBlockControl
Expand Down Expand Up @@ -82,8 +82,8 @@

<!-- Default file manager -->
<TextBlock
Padding="0,12,0,4"
FontSize="14"
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=ExperimentalFeatureFlags}" />

Expand Down
8 changes: 4 additions & 4 deletions src/Files.App/Views/Settings/AppearancePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
</TransitionCollection>
</StackPanel.ChildrenTransitions>

<!-- Personalization -->
<!-- Title -->
<TextBlock
Padding="0,0,0,4"
FontSize="14"
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=Personalization}" />
Text="{helpers:ResourceString Name=Appearance}" />

<!-- Theme -->
<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsAppearanceTheme}" HorizontalAlignment="Stretch">
Expand Down
16 changes: 8 additions & 8 deletions src/Files.App/Views/Settings/FoldersPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
</TransitionCollection>
</StackPanel.ChildrenTransitions>

<!-- Layout And Sorting -->
<!-- Title -->
<TextBlock
Padding="0,0,0,4"
FontSize="14"
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=LayoutAndSorting}" />
Text="{helpers:ResourceString Name=Folders}" />

<!-- Folder Overrides -->
<local:SettingsBlockControl
Expand Down Expand Up @@ -169,8 +169,8 @@

<!-- Display -->
<TextBlock
Padding="0,12,0,4"
FontSize="14"
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=Display}" />

Expand Down Expand Up @@ -251,8 +251,8 @@

<!-- Behaviors -->
<TextBlock
Padding="0,12,0,4"
FontSize="14"
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=Behaviors}" />

Expand Down
11 changes: 9 additions & 2 deletions src/Files.App/Views/Settings/GeneralPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
</TransitionCollection>
</StackPanel.ChildrenTransitions>

<!-- Title -->
<TextBlock
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=General}" />

<!-- Language settings -->
<local:SettingsBlockControl Title="{helpers:ResourceString Name=Language}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
Expand Down Expand Up @@ -254,8 +261,8 @@

<!-- Right Click Menu -->
<TextBlock
Padding="0,12,0,4"
FontSize="14"
Padding="0,16,0,4"
FontSize="16"
FontWeight="Medium"
Text="{helpers:ResourceString Name=SettingsContextMenu/Text}" />

Expand Down
7 changes: 7 additions & 0 deletions src/Files.App/Views/Settings/TagsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
</TransitionCollection>
</StackPanel.ChildrenTransitions>

<!-- Title -->
<TextBlock
Padding="0,0,0,12"
FontSize="24"
FontWeight="Medium"
Text="{helpers:ResourceString Name=FileTags}" />

<!-- Edit Tags -->
<local:SettingsBlockControl
Title="{helpers:ResourceString Name=FileTags}"
Expand Down