Skip to content
Closed
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
4 changes: 4 additions & 0 deletions src/Files.App/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
<Setter Target="HighContrastAdjustment" Value="None" />
</Style>

<Style TargetType="FontIcon">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to target all font icons. It's best to do it as needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But icons that use glyph are not rendered with correct foreground in context flyout with your idea.
If there’ll be a need to change color for specific items, we could set TextFillColorPrimaryBrush.
Even we don’t want to do this app-wide, could we add it to each layout page, sidebar, inner nav toolbar, address toolbar instead of setting to each?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But icons that use glyph are not rendered with correct foreground in context flyout with your idea.

Ideally we'd have a custom style for the menu items. This will also solve an issue with the font.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of them?
Then I should close this PR

<Setter Target="Foreground" Value="{ThemeResource App.Theme.IconBaseBrush}" />
</Style>

<Style BasedOn="{StaticResource DefaultComboBoxStyle}" TargetType="uc:ComboBoxEx" />

<ResourceDictionary.MergedDictionaries>
Expand Down
21 changes: 9 additions & 12 deletions src/Files.App/Dialogs/SettingsDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,74 +90,71 @@
IsSelected="True"
Tag="GeneralPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE9E9;" />
<FontIcon Glyph="&#xE9E9;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemAppearance"
Content="{helpers:ResourceString Name=Appearance}"
Tag="AppearancePage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE790;" />
<FontIcon Glyph="&#xE790;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemLayout"
Content="{helpers:ResourceString Name=Layout}"
Tag="LayoutPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE8A9;" />
<FontIcon Glyph="&#xE8A9;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemFolders"
Content="{helpers:ResourceString Name=FilesAndFolders}"
Tag="FoldersPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE8B7;" />
<FontIcon Glyph="&#xE8B7;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemActions"
Content="{helpers:ResourceString Name=Actions}"
Tag="ActionsPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xF73D;" />
<FontIcon Glyph="&#xF73D;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemTags"
Content="{helpers:ResourceString Name=FileTags}"
Tag="TagsPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE8EC;" />
<FontIcon Glyph="&#xE8EC;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemDevTools"
Content="{helpers:ResourceString Name=DevTools}"
Tag="DevToolsPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE794;" />
<FontIcon Glyph="&#xE794;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemAdvanced"
Content="{helpers:ResourceString Name=Advanced}"
Tag="AdvancedPage">
<NavigationViewItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xF1AD;" />
<FontIcon Glyph="&#xF1AD;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
AutomationProperties.AutomationId="SettingsItemAbout"
Content="{helpers:ResourceString Name=About}"
Tag="AboutPage">
<NavigationViewItem.Icon>
<FontIcon
FontSize="16"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="&#xE946;" />
<FontIcon FontSize="16" Glyph="&#xE946;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
</NavigationView.MenuItems>
Expand Down
31 changes: 6 additions & 25 deletions src/Files.App/UserControls/AddressToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@
IsEnabled="{x:Bind ViewModel.Commands.NavigateBack.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateBack.LabelWithHotKey, Mode=OneWay}">
<FontIcon
FontSize="14"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="{x:Bind ViewModel.Commands.NavigateBack.Glyph.BaseGlyph, Mode=OneWay}" />
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateBack.Glyph.BaseGlyph, Mode=OneWay}" />
</Button>

<Button
Expand All @@ -265,10 +262,7 @@
IsEnabled="{x:Bind ViewModel.Commands.NavigateForward.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateForward.LabelWithHotKey, Mode=OneWay}">
<FontIcon
FontSize="14"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="{x:Bind ViewModel.Commands.NavigateForward.Glyph.BaseGlyph, Mode=OneWay}" />
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateForward.Glyph.BaseGlyph, Mode=OneWay}" />
</Button>

<Button
Expand All @@ -282,10 +276,7 @@
IsEnabled="{x:Bind ViewModel.Commands.NavigateUp.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateUp.LabelWithHotKey, Mode=OneWay}">
<FontIcon
FontSize="14"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="{x:Bind ViewModel.Commands.NavigateUp.Glyph.BaseGlyph, Mode=OneWay}" />
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateUp.Glyph.BaseGlyph, Mode=OneWay}" />
</Button>

<Button
Expand All @@ -298,10 +289,7 @@
IsEnabled="{x:Bind Commands.RefreshItems.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind Commands.RefreshItems.LabelWithHotKey, Mode=OneWay}">
<FontIcon
FontSize="14"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="{x:Bind Commands.RefreshItems.Glyph.BaseGlyph}" />
<FontIcon FontSize="14" Glyph="{x:Bind Commands.RefreshItems.Glyph.BaseGlyph}" />
</Button>
</StackPanel>

Expand Down Expand Up @@ -390,7 +378,6 @@
Grid.Column="1"
Margin="12"
FontSize="16"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="&#xE70D;" />
</Grid>

Expand Down Expand Up @@ -425,10 +412,7 @@
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.Search.LabelWithHotKey, Mode=OneWay}"
Visibility="Collapsed">
<FontIcon
FontSize="14"
Foreground="{ThemeResource App.Theme.IconBaseBrush}"
Glyph="{x:Bind ViewModel.SearchButtonGlyph, Mode=OneWay}" />
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.SearchButtonGlyph, Mode=OneWay}" />
</Button>

<!-- Status Center -->
Expand Down Expand Up @@ -555,10 +539,7 @@
ToolTipService.Placement="Bottom"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.OpenSettings.LabelWithHotKey, Mode=OneWay}"
Visibility="{x:Bind ShowSettingsButton, Mode=OneWay}">
<AnimatedIcon
x:Name="SettingAnimatedIcon"
Height="16"
Foreground="{ThemeResource App.Theme.IconBaseBrush}">
<AnimatedIcon x:Name="SettingAnimatedIcon" Height="16">
<AnimatedIcon.Source>
<animatedvisuals:AnimatedSettingsVisualSource />
</AnimatedIcon.Source>
Expand Down
26 changes: 13 additions & 13 deletions src/Files.App/UserControls/InnerNavigationToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
KeyboardAcceleratorTextOverride="{x:Bind Commands.CreateFolder.HotKeyText, Mode=OneWay}"
Text="{x:Bind Commands.CreateFolder.Label}">
<MenuFlyoutItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE8B7;" />
<FontIcon Glyph="&#xE8B7;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem
Expand All @@ -115,7 +115,7 @@
IsEnabled="{x:Bind ViewModel.InstanceViewModel.CanCreateFileInPage, Mode=OneWay}"
Text="{helpers:ResourceString Name=File}">
<MenuFlyoutItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE7C3;" />
<FontIcon Glyph="&#xE7C3;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem
Expand All @@ -126,7 +126,7 @@
KeyboardAcceleratorTextOverride="{x:Bind Commands.CreateShortcutFromDialog.HotKeyText, Mode=OneWay}"
Text="{x:Bind Commands.CreateShortcutFromDialog.Label}">
<MenuFlyoutItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="&#xE71B;" />
<FontIcon Glyph="&#xE71B;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator x:Name="NewMenuFileFolderSeparator" />
Expand Down Expand Up @@ -345,7 +345,7 @@
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.RunWithPowershell.LabelWithHotKey, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.RunWithPowershell.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.RunWithPowershell.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
</AppBarButton>

Expand All @@ -361,7 +361,7 @@
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.EditInNotepad.LabelWithHotKey, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.EditInNotepad.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.EditInNotepad.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
</AppBarButton>

Expand All @@ -386,7 +386,7 @@
KeyboardAcceleratorTextOverride="{x:Bind Commands.SetAsWallpaperBackground.HotKeyText, Mode=OneWay}"
Text="{helpers:ResourceString Name=Desktop}">
<MenuFlyoutItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.SetAsWallpaperBackground.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.SetAsWallpaperBackground.Glyph.BaseGlyph}" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem
Expand All @@ -395,7 +395,7 @@
KeyboardAcceleratorTextOverride="{x:Bind Commands.SetAsLockscreenBackground.HotKeyText, Mode=OneWay}"
Text="{helpers:ResourceString Name=Lockscreen}">
<MenuFlyoutItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.SetAsLockscreenBackground.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.SetAsLockscreenBackground.Glyph.BaseGlyph}" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem
Expand All @@ -404,7 +404,7 @@
KeyboardAcceleratorTextOverride="{x:Bind Commands.SetAsAppBackground.HotKeyText, Mode=OneWay}"
Text="{helpers:ResourceString Name=Application}">
<MenuFlyoutItem.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.SetAsAppBackground.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.SetAsAppBackground.Glyph.BaseGlyph}" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
Expand Down Expand Up @@ -433,7 +433,7 @@
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallInfDriver.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.InstallInfDriver.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
</AppBarButton>

Expand Down Expand Up @@ -468,7 +468,7 @@
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallFont.Glyph.BaseGlyph, Mode=OneTime}" />
<FontIcon Glyph="{x:Bind Commands.InstallFont.Glyph.BaseGlyph, Mode=OneTime}" />
</AppBarButton.Icon>
</AppBarButton>

Expand All @@ -481,7 +481,7 @@
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallCertificate.Glyph.BaseGlyph, Mode=OneTime}" />
<FontIcon Glyph="{x:Bind Commands.InstallCertificate.Glyph.BaseGlyph, Mode=OneTime}" />
</AppBarButton.Icon>
</AppBarButton>

Expand All @@ -495,7 +495,7 @@
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.PlayAll.LabelWithHotKey, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.PlayAll.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.PlayAll.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
</AppBarButton>

Expand Down Expand Up @@ -1240,7 +1240,7 @@
Label="{x:Bind Commands.ClosePane.Label}"
ToolTipService.ToolTip="{x:Bind Commands.ClosePane.LabelWithHotKey, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.ClosePane.Glyph.BaseGlyph}" />
<FontIcon Glyph="{x:Bind Commands.ClosePane.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
</AppBarButton>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
x:Name="SettingsIconElement"
Margin="2,20,20,20"
x:Load="{x:Bind Icon, Mode=OneWay, Converter={StaticResource NullToFalseConverter}}"
Content="{x:Bind Icon, Mode=OneWay}"
Foreground="{ThemeResource App.Theme.IconBaseBrush}" />
Content="{x:Bind Icon, Mode=OneWay}" />

<Grid
x:Name="DescriptionPanel"
Expand Down