Skip to content

Commit a8f5561

Browse files
author
Richard
authored
Added icons to right click context menu on the sidebar (#1184)
1 parent 083dc6f commit a8f5561

File tree

7 files changed

+51
-11
lines changed

7 files changed

+51
-11
lines changed

Files/App.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<Application.Resources>
66
<ResourceDictionary>
77
<FontFamily x:Key="CustomLayoutModeIcon">/Assets/Custom Glyphs/layout-mode-custom-icon.ttf#layout-mode-custom-icon</FontFamily>
8+
<FontFamily x:Key="CustomNewTabIcon">/Assets/Custom Glyphs/newtab-icon.ttf#newtab-icon</FontFamily>
89
<FontFamily x:Key="RecycleBinIcons">/Assets/Custom Glyphs/recyclebin-fabric-glyph.ttf#Fabric MDL2 Assets</FontFamily>
910
<ResourceDictionary.MergedDictionaries>
1011
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
1.3 KB
Binary file not shown.

Files/Files.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@
292292
<Content Include="Assets\Custom Glyphs\recyclebin-fabric-glyph.ttf">
293293
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
294294
</Content>
295+
<Content Include="Assets\Custom Glyphs\newtab-icon.ttf">
296+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
297+
</Content>
295298
<None Include="Assets\terminal\terminal.json">
296299
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
297300
</None>

Files/UserControls/ModernNavigationToolbar.xaml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,32 +785,52 @@
785785
<MenuFlyoutItem
786786
x:Uid="NavigationToolbarNewTab"
787787
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.OpenNewTab}"
788-
Text="New Tab" />
788+
Text="New Tab">
789+
<MenuFlyoutItem.Icon>
790+
<FontIcon FontFamily="{StaticResource CustomNewTabIcon}" Glyph="&#xF400;" />
791+
</MenuFlyoutItem.Icon>
792+
</MenuFlyoutItem>
789793
<MenuFlyoutItem
790794
x:Uid="NavigationToolbarNewWindow"
791795
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.LaunchNewWindow}"
792-
Text="New Window" />
796+
Text="New Window">
797+
<MenuFlyoutItem.Icon>
798+
<FontIcon Glyph="&#xE737;" />
799+
</MenuFlyoutItem.Icon>
800+
</MenuFlyoutItem>
793801
<MenuFlyoutItem
794802
x:Name="CopyPathButton"
795803
x:Uid="NavigationToolbarCopyPath"
796804
x:Load="{x:Bind local1:App.CurrentInstance.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
797805
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.GetPath_Click}"
798-
Text="Copy Path" />
806+
Text="Copy Path">
807+
<MenuFlyoutItem.Icon>
808+
<FontIcon Glyph="&#xE8C8;" />
809+
</MenuFlyoutItem.Icon>
810+
</MenuFlyoutItem>
799811
<MenuFlyoutSeparator x:Name="SeparatorBar" x:Load="{x:Bind local1:App.CurrentInstance.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}" />
800812
<MenuFlyoutItem
801813
x:Name="PasteButton"
802814
x:Uid="NavigationToolbarPaste"
803815
x:Load="{x:Bind local1:App.CurrentInstance.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
804816
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.PasteItem_ClickAsync}"
805817
IsEnabled="{x:Bind local1:App.PS.IsEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
806-
Text="Paste" />
818+
Text="Paste">
819+
<MenuFlyoutItem.Icon>
820+
<FontIcon Glyph="&#xE77F;" />
821+
</MenuFlyoutItem.Icon>
822+
</MenuFlyoutItem>
807823
<MenuFlyoutItem
808824
x:Name="OpenInTerminalButton"
809825
x:Uid="NavigationToolbarOpenInTerminal"
810826
x:Load="{x:Bind local1:App.CurrentInstance.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
811827
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.OpenDirectoryInTerminal}"
812828
IsEnabled="{x:Bind local1:App.CurrentInstance.InstanceViewModel.IsPageTypeNotRecycleBin, Mode=OneWay}"
813-
Text="Open in Terminal..." />
829+
Text="Open in Terminal...">
830+
<MenuFlyoutItem.Icon>
831+
<FontIcon Glyph="&#xE756;" />
832+
</MenuFlyoutItem.Icon>
833+
</MenuFlyoutItem>
814834
</MenuFlyout>
815835
</Button.Flyout>
816836
</Button>

Files/UserControls/SidebarControl.xaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,23 +142,39 @@
142142
x:Uid="BaseLayoutContextFlyoutEmptyRecycleBin"
143143
x:Load="{x:Bind ShowEmptyRecycleBin, Mode=OneWay}"
144144
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.EmptyRecycleBin_ClickAsync}"
145-
Text="Empty recycle bin" />
145+
Text="Empty recycle bin">
146+
<MenuFlyoutItem.Icon>
147+
<FontIcon FontFamily="{StaticResource RecycleBinIcons}" Glyph="&#xEF88;" />
148+
</MenuFlyoutItem.Icon>
149+
</MenuFlyoutItem>
146150
<MenuFlyoutItem
147151
x:Name="OpenInNewTab"
148152
x:Uid="SideBarOpenInNewTab"
149153
Click="OpenInNewTab_Click"
150-
Text="Open in new tab" />
154+
Text="Open in new tab">
155+
<MenuFlyoutItem.Icon>
156+
<FontIcon FontFamily="{StaticResource CustomNewTabIcon}" Glyph="&#xF500;" />
157+
</MenuFlyoutItem.Icon>
158+
</MenuFlyoutItem>
151159
<MenuFlyoutItem
152160
x:Name="OpenInNewWindow"
153161
x:Uid="SideBarOpenInNewWindow"
154162
Click="OpenInNewWindow_Click"
155-
Text="Open in new window" />
163+
Text="Open in new window">
164+
<MenuFlyoutItem.Icon>
165+
<FontIcon Glyph="&#xE8A7;" />
166+
</MenuFlyoutItem.Icon>
167+
</MenuFlyoutItem>
156168
<MenuFlyoutItem
157169
x:Name="UnpinItem"
158170
x:Uid="SideBarUnpinFromSideBar"
159171
x:Load="{x:Bind ShowUnpinItem, Mode=OneWay}"
160172
Click="{x:Bind local1:App.UnpinItem_Click}"
161-
Text="Unpin from Sidebar" />
173+
Text="Unpin from Sidebar">
174+
<MenuFlyoutItem.Icon>
175+
<FontIcon Glyph="&#xE77A;" />
176+
</MenuFlyoutItem.Icon>
177+
</MenuFlyoutItem>
162178
</MenuFlyout.Items>
163179
</MenuFlyout>
164180
</ResourceDictionary>

Files/Views/LayoutModes/GenericFileBrowser.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
Tag="OpenTab_FlyoutItem"
201201
Text="Open in new tab">
202202
<MenuFlyoutItem.Icon>
203-
<FontIcon Glyph="&#xE737;" />
203+
<FontIcon FontFamily="{StaticResource CustomNewTabIcon}" Glyph="&#xF500;" />
204204
</MenuFlyoutItem.Icon>
205205
</MenuFlyoutItem>
206206
<MenuFlyoutItem

Files/Views/LayoutModes/GridViewBrowser.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
Tag="OpenTab_FlyoutItem"
197197
Text="Open in new tab">
198198
<MenuFlyoutItem.Icon>
199-
<FontIcon Glyph="&#xE737;" />
199+
<FontIcon FontFamily="{StaticResource CustomNewTabIcon}" Glyph="&#xF500;" />
200200
</MenuFlyoutItem.Icon>
201201
</MenuFlyoutItem>
202202
<MenuFlyoutItem

0 commit comments

Comments
 (0)