Skip to content

Feature: Reduce sub settings item height #9943

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 1 commit into from
Sep 8, 2022
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
6 changes: 3 additions & 3 deletions src/Files.App/UserControls/Settings/SettingsBlockControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<Setter Property="BorderThickness" Value="{ThemeResource ExpanderHeaderBorderThickness}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="{StaticResource ExpanderMinHeight}" />
<Setter Property="Padding" Value="{StaticResource ExpanderContentPadding}" />
<Setter Property="Padding" Value="20,4,20,4" />
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
</Style>

Expand All @@ -43,7 +43,7 @@
<Setter Property="BorderThickness" Value="{ThemeResource ExpanderHeaderBorderThickness}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="{StaticResource ExpanderContentPadding}" />
<Setter Property="Padding" Value="20,4,20,4" />
<Setter Property="MinHeight" Value="{StaticResource ExpanderMinHeight}" />
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
</Style>
Expand All @@ -63,7 +63,7 @@
<Expander.Header>
<local:SettingsDisplayControl
Title="{x:Bind Title, Mode=OneWay}"
Margin="0,16"
Margin="0,4"
AdditionalDescriptionContent="{x:Bind AdditionalDescriptionContent, Mode=OneWay}"
Description="{x:Bind Description, Mode=OneWay}"
Icon="{x:Bind Icon, Mode=OneWay}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
xmlns:local="using:Files.App.UserControls.Settings"
xmlns:local1="using:Files.App.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
MinHeight="40"
d:DesignHeight="300"
d:DesignWidth="400"
SizeChanged="MainPanel_SizeChanged"
Expand All @@ -31,7 +30,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="42" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
Expand All @@ -43,7 +42,7 @@

<ContentPresenter
x:Name="SettingsIconElement"
Margin="2,0,20,0"
Margin="2,20,20,20"
x:Load="{x:Bind Icon, Mode=OneWay, Converter={StaticResource NullToFalseConverter}}"
Content="{x:Bind Icon, Mode=OneWay}" />

Expand Down
8 changes: 0 additions & 8 deletions src/Files.App/Views/SettingsPages/About.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
Title="{helpers:ResourceString Name=ExportSettings}"
ButtonCommand="{x:Bind ViewModel.ExportSettingsCommand}"
IsClickable="True">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xEDE1;" />
</local:SettingsBlockControl.Icon>

<FontIcon
FontSize="14"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Expand All @@ -85,10 +81,6 @@
Title="{helpers:ResourceString Name=ImportSettings}"
ButtonCommand="{x:Bind ViewModel.ImportSettingsCommand}"
IsClickable="True">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE8B5;" />
</local:SettingsBlockControl.Icon>

<FontIcon
FontSize="14"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Expand Down
24 changes: 0 additions & 24 deletions src/Files.App/Views/SettingsPages/Appearance.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@
<local:SettingsBlockControl.ExpandableContent>
<StackPanel>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowFavoritesSection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<SymbolIcon Symbol="Favorite" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowFavoritesSectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowFavoritesSection, Mode=TwoWay}"
Expand All @@ -97,69 +94,48 @@
Title="{helpers:ResourceString Name=SettingsPinRecycleBin/Title}"
HorizontalAlignment="Stretch"
IsEnabled="{Binding ShowFavoritesSection}">
<local:SettingsBlockControl.Icon>
<SymbolIcon Symbol="Pin" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsPinRecycleBinSwitch/AutomationProperties/Name}"
IsOn="{Binding PinRecycleBinToSideBar, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowLibrarySection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<SymbolIcon Symbol="Library" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowLibrarySectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowLibrarySection, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowDrivesSection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xEDA2;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowDrivesSectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowDrivesSection, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowCloudDrivesSection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE753;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowCloudDrivesSectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowCloudDrivesSection, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowNetworkDrivesSection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE968;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowNetworkDrivesSectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowNetworkDrivesSection, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowWslSection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xEC7A;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowWslSectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowWslSection, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsShowFileTagsSection/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE1CB;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowFileTagsSectionSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowFileTagsSection, Mode=TwoWay}"
Expand Down
78 changes: 9 additions & 69 deletions src/Files.App/Views/SettingsPages/Preferences.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,51 +135,28 @@
<local:SettingsBlockControl.ExpandableContent>
<StackPanel>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsPreferencesShowConfirmDeleteDialog/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE107;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
x:Name="ShowConfirmDeleteDialogSwitch"
AutomationProperties.Name="{helpers:ResourceString Name=SettingsShowConfirmDeleteDialogToggleSwitch/AutomationProperties/Name}"
IsOn="{Binding ShowConfirmDeleteDialog, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsPreferencesOpenFoldersNewTab/Title}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xF12B;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
x:Name="OpenFoldersNewTab"
AutomationProperties.Name="{helpers:ResourceString Name=SettingsOpenFoldersNewTabToggleSwitch/AutomationProperties/Name}"
IsOn="{Binding OpenFoldersNewTab, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsFilesAndFoldersShowFileExtensions}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE160;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersShowFileExtensions}"
IsOn="{Binding ShowFileExtensions, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsFilesAndFoldersShowThumbnails}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE91B;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersShowThumbnails}"
IsOn="{Binding ShowThumbnails, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsListAndSortDirectoriesAlongsideFiles}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE174;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsListAndSortDirectoriesAlongsideFiles}"
IsOn="{Binding ListAndSortDirectoriesAlongsideFiles, Mode=TwoWay}"
Expand All @@ -198,79 +175,66 @@
<local:SettingsBlockControl.ExpandableContent>
<StackPanel>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsOpenFilesWithOneClick}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE8B0;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsOpenFilesWithOneClick}"
IsOn="{Binding OpenFilesWithOneClick, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsOpenFoldersWithOneClick}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE8B0;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsOpenFoldersWithOneClick}"
IsOn="{Binding OpenFoldersWithOneClick, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=OpenFolderWithOneClickColumnsLayout}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE8B0;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=OpenFolderWithOneClickColumnsLayout}"
IsOn="{Binding ColumnLayoutOpenFoldersWithOneClick, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsPreferencesOpenFoldersNewTab/Title}" HorizontalAlignment="Stretch">
<ToggleSwitch
x:Name="OpenFoldersNewTab"
AutomationProperties.Name="{helpers:ResourceString Name=SettingsOpenFoldersNewTabToggleSwitch/AutomationProperties/Name}"
IsOn="{Binding OpenFoldersNewTab, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>
</StackPanel>
</local:SettingsBlockControl.ExpandableContent>
</local:SettingsBlockControl>

<!-- Hidden file and folder settings -->
<local:SettingsBlockControl Title="{helpers:ResourceString Name=HiddenFilesAndFolders}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xF12B;" />
<FontIcon Glyph="&#xED1A;" />
</local:SettingsBlockControl.Icon>
<local:SettingsBlockControl.ExpandableContent>
<StackPanel>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsFilesAndFoldersShowHiddenItems}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersShowHiddenItems}"
IsOn="{Binding AreHiddenItemsVisible, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=ShowDotFiles}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=ShowDotFiles}"
IsOn="{Binding ShowDotFiles, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsFilesAndFoldersHideSystemItems}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon contract13NotPresent:Glyph="&#xE72E;" contract13Present:Glyph="&#xED1A;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsFilesAndFoldersHideSystemItems}"
IsOn="{Binding AreSystemItemsHidden, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=ShowAlternateStreams}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE16F;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=ShowAlternateStreams}"
IsOn="{Binding AreAlternateStreamsVisible, Mode=TwoWay}"
Expand Down Expand Up @@ -313,55 +277,37 @@
<local:SettingsBlockControl.ExpandableContent>
<StackPanel>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=ForceThesePreferencesOnAllDirectories}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE8B7;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=ForceThesePreferencesOnAllDirectories}"
IsOn="{Binding ForceLayoutPreferencesOnAllDirectories, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=DisplayTagColumn}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=DisplayTagColumn}"
IsOn="{Binding ShowFileTagColumn, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=DisplaySizeColumn}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=DisplaySizeColumn}"
IsOn="{Binding ShowSizeColumn, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=DisplayTypeColumn}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=DisplayTypeColumn}"
IsOn="{Binding ShowTypeColumn, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=DisplayDateColumn}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=DisplayDateColumn}"
IsOn="{Binding ShowDateColumn, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>
<local:SettingsBlockControl Title="{helpers:ResourceString Name=DisplayDateCreatedColumn}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7B3;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=DisplayDateCreatedColumn}"
IsOn="{Binding ShowDateCreatedColumn, Mode=TwoWay}"
Expand Down Expand Up @@ -463,19 +409,13 @@
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=OpenNewInstance}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7E8;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=OpenNewInstance}"
IsOn="{Binding AlwaysOpenANewInstance, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=SettingsOpenInLogin}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE7E8;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=SettingsOpenInLogin}"
IsEnabled="{Binding CanOpenInLogin, Mode=OneWay}"
Expand Down