Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit b5c7b35

Browse files
committed
Fix context menu icon colors and sizes
1 parent a9c0614 commit b5c7b35

File tree

3 files changed

+83
-52
lines changed

3 files changed

+83
-52
lines changed

src/GitHub.VisualStudio/GitHub.VisualStudio.vsct

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,19 @@
6464
</Menu>
6565

6666
</Menus>
67-
68-
<!--Buttons section. -->
69-
<!--This section defines the elements the user can interact with, like a menu command or a button
70-
or combo box in a toolbar. -->
67+
68+
<!-- Parenting of buttons is done in the CommandPlacements section -->
7169
<Buttons>
72-
<!--To define a menu group you have to specify its ID, the parent menu and its display priority.
73-
The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
74-
the CommandFlag node.
75-
You can add more than one CommandFlag node e.g.:
76-
<CommandFlag>DefaultInvisible</CommandFlag>
77-
<CommandFlag>DynamicVisibility</CommandFlag>
78-
If you do not want an image next to your command, remove the Icon node /> -->
79-
80-
<Button guid="guidGitHubCmdSet" id="addConnectionCommand" priority="0x0100" type="Button">
81-
<Parent guid="guidGitHubCmdSet" id="idGitHubMenuGroup" />
70+
71+
<Button guid="guidGitHubCmdSet" id="addConnectionCommand" type="Button">
8272
<Icon guid="guidImages" id="logo" />
8373
<CommandFlag>IconIsMoniker</CommandFlag>
8474
<Strings>
8575
<ButtonText>&amp;Connect to GitHub</ButtonText>
8676
</Strings>
8777
</Button>
8878

89-
<Button guid="guidGitHubCmdSet" id="showGitHubPaneCommand" priority="0x0100" type="Button">
90-
<Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1" />
79+
<Button guid="guidGitHubCmdSet" id="showGitHubPaneCommand" type="Button">
9180
<Icon guid="guidImages" id="logo" />
9281
<CommandFlag>IconIsMoniker</CommandFlag>
9382
<Strings>
@@ -96,44 +85,39 @@
9685
</Button>
9786

9887
<!--- Toolbar buttons -->
99-
<Button guid="guidGitHubToolbarCmdSet" id="backCommand" priority="0x0100" type="Button">
100-
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup" />
88+
<Button guid="guidGitHubToolbarCmdSet" id="backCommand" type="Button">
10189
<Icon guid="guidImages" id="arrow_left" />
10290
<CommandFlag>IconIsMoniker</CommandFlag>
10391
<Strings>
10492
<ButtonText></ButtonText>
10593
</Strings>
10694
</Button>
10795

108-
<Button guid="guidGitHubToolbarCmdSet" id="forwardCommand" priority="0x0101" type="Button">
109-
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup" />
96+
<Button guid="guidGitHubToolbarCmdSet" id="forwardCommand" type="Button">
11097
<Icon guid="guidImages" id="arrow_right" />
11198
<CommandFlag>IconIsMoniker</CommandFlag>
11299
<Strings>
113100
<ButtonText></ButtonText>
114101
</Strings>
115102
</Button>
116103

117-
<Button guid="guidGitHubToolbarCmdSet" id="pullRequestCommand" priority="0x0102" type="Button">
118-
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup" />
104+
<Button guid="guidGitHubToolbarCmdSet" id="pullRequestCommand" type="Button">
119105
<Icon guid="guidImages" id="pullrequest" />
120106
<CommandFlag>IconIsMoniker</CommandFlag>
121107
<Strings>
122108
<ButtonText></ButtonText>
123109
</Strings>
124110
</Button>
125111

126-
<Button guid="guidGitHubToolbarCmdSet" id="refreshCommand" priority="0x0110" type="Button">
127-
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup1" />
112+
<Button guid="guidGitHubToolbarCmdSet" id="refreshCommand" type="Button">
128113
<Icon guid="guidImages" id="refresh" />
129114
<CommandFlag>IconIsMoniker</CommandFlag>
130115
<Strings>
131116
<ButtonText></ButtonText>
132117
</Strings>
133118
</Button>
134119

135-
<Button guid="guidContextMenuSet" id="openLinkCommand" priority="0x0100" type="Button">
136-
<Parent guid="guidContextMenuSet" id="idGitHubContextSubMenuGroup"/>
120+
<Button guid="guidContextMenuSet" id="openLinkCommand" type="Button">
137121
<Icon guid="guidImages" id="link_external" />
138122
<CommandFlag>IconIsMoniker</CommandFlag>
139123
<CommandFlag>DefaultInvisible</CommandFlag>
@@ -143,8 +127,7 @@
143127
</Strings>
144128
</Button>
145129

146-
<Button guid="guidContextMenuSet" id="copyLinkCommand" priority="0x0101" type="Button">
147-
<Parent guid="guidContextMenuSet" id="idGitHubContextSubMenuGroup"/>
130+
<Button guid="guidContextMenuSet" id="copyLinkCommand" type="Button">
148131
<Icon guid="guidImages" id="clippy" />
149132
<CommandFlag>IconIsMoniker</CommandFlag>
150133
<CommandFlag>DefaultInvisible</CommandFlag>
@@ -158,6 +141,8 @@
158141
</Commands>
159142

160143
<CommandPlacements>
144+
145+
<!-- context menu -->
161146
<CommandPlacement guid="guidContextMenuSet" id="idGitHubContextMenuGroup" priority="0x1000">
162147
<Parent guid="GUID_XAML_EDITOR" id="ID_XAML_CTXT"/>
163148
</CommandPlacement>
@@ -173,6 +158,44 @@
173158
<CommandPlacement guid="guidContextMenuSet" id="idGitHubContextMenuGroup" priority="0x1000">
174159
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
175160
</CommandPlacement>
161+
162+
<!-- open and copy link to GitHub commands -->
163+
<CommandPlacement guid="guidContextMenuSet" id="openLinkCommand" priority="0x100">
164+
<Parent guid="guidContextMenuSet" id="idGitHubContextSubMenuGroup"/>
165+
</CommandPlacement>
166+
167+
<CommandPlacement guid="guidContextMenuSet" id="copyLinkCommand" priority="0x101">
168+
<Parent guid="guidContextMenuSet" id="idGitHubContextSubMenuGroup"/>
169+
</CommandPlacement>
170+
171+
<!-- Standard toolbar commands -->
172+
<CommandPlacement guid="guidGitHubToolbarCmdSet" id="backCommand" priority="0x100">
173+
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup"/>
174+
</CommandPlacement>
175+
176+
<CommandPlacement guid="guidGitHubToolbarCmdSet" id="forwardCommand" priority="0x101">
177+
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup"/>
178+
</CommandPlacement>
179+
180+
<CommandPlacement guid="guidGitHubToolbarCmdSet" id="refreshCommand" priority="0x110">
181+
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup1"/>
182+
</CommandPlacement>
183+
184+
<!-- Feature commands (open pull requests, etc) -->
185+
<CommandPlacement guid="guidGitHubToolbarCmdSet" id="pullRequestCommand" priority="0x102">
186+
<Parent guid="guidGitHubToolbarCmdSet" id="idGitHubToolbarMenuGroup"/>
187+
</CommandPlacement>
188+
189+
<!-- Show GitHub pane command -->
190+
<CommandPlacement guid="guidGitHubCmdSet" id="showGitHubPaneCommand" priority="0x0100">
191+
<Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
192+
</CommandPlacement>
193+
194+
<!-- Add Connection (Team Explorer) command -->
195+
<CommandPlacement guid="guidGitHubCmdSet" id="addConnectionCommand" priority="0x0100">
196+
<Parent guid="guidGitHubCmdSet" id="idGitHubMenuGroup"/>
197+
</CommandPlacement>
198+
176199
</CommandPlacements>
177200

178201
<Symbols>
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2-
xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers"
3-
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI">
4-
<Viewbox.Resources>
5-
<ResourceDictionary>
6-
<ResourceDictionary.MergedDictionaries>
7-
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
8-
</ResourceDictionary.MergedDictionaries>
9-
</ResourceDictionary>
10-
</Viewbox.Resources>
11-
<ui:OcticonImage Icon="clippy"
12-
VerticalAlignment="Center"
13-
Background="{DynamicResource VsBrush.ActiveBorder}" />
2+
Width="1024" Height="1024">
3+
<Border BorderBrush="Transparent" BorderThickness="1">
4+
<ui:OcticonImage xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers"
5+
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
6+
Foreground="{DynamicResource GitHubContextMenuIconBrush}"
7+
Icon="clippy">
8+
<ui:OcticonImage.Resources>
9+
<ResourceDictionary>
10+
<ResourceDictionary.MergedDictionaries>
11+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
12+
<cache:SharedDictionaryManager Source="Theme.xaml" />
13+
</ResourceDictionary.MergedDictionaries>
14+
</ResourceDictionary>
15+
</ui:OcticonImage.Resources>
16+
</ui:OcticonImage>
17+
</Border>
1418
</Viewbox>
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2-
xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers"
3-
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI">
4-
<Viewbox.Resources>
5-
<ResourceDictionary>
6-
<ResourceDictionary.MergedDictionaries>
7-
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
8-
</ResourceDictionary.MergedDictionaries>
9-
</ResourceDictionary>
10-
</Viewbox.Resources>
11-
<ui:OcticonImage Icon="link_external"
12-
VerticalAlignment="Center"
13-
Background="{DynamicResource VsBrush.ActiveBorder}" />
2+
Width="1024" Height="1024">
3+
<Border BorderBrush="Transparent" BorderThickness="1">
4+
<ui:OcticonImage xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers"
5+
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
6+
Foreground="{DynamicResource GitHubContextMenuIconBrush}"
7+
Icon="link_external">
8+
<ui:OcticonImage.Resources>
9+
<ResourceDictionary>
10+
<ResourceDictionary.MergedDictionaries>
11+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
12+
<cache:SharedDictionaryManager Source="Theme.xaml" />
13+
</ResourceDictionary.MergedDictionaries>
14+
</ResourceDictionary>
15+
</ui:OcticonImage.Resources>
16+
</ui:OcticonImage>
17+
</Border>
1418
</Viewbox>

0 commit comments

Comments
 (0)