Browse Source

Add XAML icons in toolbar.

pull/1704/head
Siegfried Pammer 6 years ago
parent
commit
8d116d9cfb
  1. 2
      ILSpy/Analyzers/AnalyzeCommand.cs
  2. 2
      ILSpy/Commands/BrowseBackCommand.cs
  3. 2
      ILSpy/Commands/BrowseForwardCommand.cs
  4. 4
      ILSpy/Commands/OpenCommand.cs
  5. 4
      ILSpy/Commands/RefreshCommand.cs
  6. 8
      ILSpy/Commands/SortAssemblyListCommand.cs
  7. 36
      ILSpy/ILSpy.csproj
  8. BIN
      ILSpy/Images/Back.png
  9. 20
      ILSpy/Images/Back.xaml
  10. BIN
      ILSpy/Images/CollapseAll.png
  11. 21
      ILSpy/Images/CollapseAll.xaml
  12. BIN
      ILSpy/Images/Find.png
  13. BIN
      ILSpy/Images/Forward.png
  14. 20
      ILSpy/Images/Forward.xaml
  15. 54
      ILSpy/Images/Images.cs
  16. BIN
      ILSpy/Images/Open.png
  17. 20
      ILSpy/Images/Open.xaml
  18. BIN
      ILSpy/Images/Refresh.png
  19. 19
      ILSpy/Images/Refresh.xaml
  20. BIN
      ILSpy/Images/Search.png
  21. 20
      ILSpy/Images/Search.xaml
  22. BIN
      ILSpy/Images/Sort.png
  23. 21
      ILSpy/Images/Sort.xaml
  24. 30
      ILSpy/MainWindow.xaml.cs
  25. 4
      ILSpy/Search/SearchPane.cs

2
ILSpy/Analyzers/AnalyzeCommand.cs

@ -25,7 +25,7 @@ using ICSharpCode.ILSpy.TreeNodes; @@ -25,7 +25,7 @@ using ICSharpCode.ILSpy.TreeNodes;
namespace ICSharpCode.ILSpy.Analyzers
{
[ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search.png", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)]
[ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)]
internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry
{
public bool IsVisible(TextViewContext context)

2
ILSpy/Commands/BrowseBackCommand.cs

@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)]
sealed class BrowseBackCommand : CommandWrapper
{
public BrowseBackCommand()

2
ILSpy/Commands/BrowseForwardCommand.cs

@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)]
sealed class BrowseForwardCommand : CommandWrapper
{
public BrowseForwardCommand()

4
ILSpy/Commands/OpenCommand.cs

@ -21,8 +21,8 @@ using ICSharpCode.ILSpy.Properties; @@ -21,8 +21,8 @@ using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.Open), ToolbarIcon = "Images/Open.png", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 0)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Open), MenuIcon = "Images/Open.png", MenuCategory = nameof(Resources.Open), MenuOrder = 0)]
[ExportToolbarCommand(ToolTip = nameof(Resources.Open), ToolbarIcon = "Images/Open", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 0)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Open), MenuIcon = "Images/Open", MenuCategory = nameof(Resources.Open), MenuOrder = 0)]
sealed class OpenCommand : CommandWrapper
{
public OpenCommand()

4
ILSpy/Commands/RefreshCommand.cs

@ -21,8 +21,8 @@ using ICSharpCode.ILSpy.Properties; @@ -21,8 +21,8 @@ using ICSharpCode.ILSpy.Properties;
namespace ICSharpCode.ILSpy
{
[ExportToolbarCommand(ToolTip = nameof(Resources.RefreshCommand_ReloadAssemblies), ToolbarIcon = "Images/Refresh.png", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 2)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Reload), MenuIcon = "Images/Refresh.png", MenuCategory = nameof(Resources.Open), MenuOrder = 2)]
[ExportToolbarCommand(ToolTip = nameof(Resources.RefreshCommand_ReloadAssemblies), ToolbarIcon = "Images/Refresh", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 2)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Reload), MenuIcon = "Images/Refresh", MenuCategory = nameof(Resources.Open), MenuOrder = 2)]
sealed class RefreshCommand : CommandWrapper
{
public RefreshCommand()

8
ILSpy/Commands/SortAssemblyListCommand.cs

@ -23,8 +23,8 @@ using ICSharpCode.TreeView; @@ -23,8 +23,8 @@ using ICSharpCode.TreeView;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.SortAssembly_listName), MenuIcon = "Images/Sort.png", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.SortAssemblyListName), ToolbarIcon = "Images/Sort.png", ToolbarCategory = nameof(Resources.View))]
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.SortAssembly_listName), MenuIcon = "Images/Sort", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.SortAssemblyListName), ToolbarIcon = "Images/Sort", ToolbarCategory = nameof(Resources.View))]
sealed class SortAssemblyListCommand : SimpleCommand, IComparer<LoadedAssembly>
{
public override void Execute(object parameter)
@ -39,8 +39,8 @@ namespace ICSharpCode.ILSpy @@ -39,8 +39,8 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._CollapseTreeNodes), MenuIcon = "Images/CollapseAll.png", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.CollapseTreeNodes), ToolbarIcon = "Images/CollapseAll.png", ToolbarCategory = nameof(Resources.View))]
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._CollapseTreeNodes), MenuIcon = "Images/CollapseAll", MenuCategory = nameof(Resources.View))]
[ExportToolbarCommand(ToolTip = nameof(Resources.CollapseTreeNodes), ToolbarIcon = "Images/CollapseAll", ToolbarCategory = nameof(Resources.View))]
sealed class CollapseAllCommand : SimpleCommand
{
public override void Execute(object parameter)

36
ILSpy/ILSpy.csproj

@ -312,6 +312,13 @@ @@ -312,6 +312,13 @@
<Page Include="Controls\SearchBoxStyle.xaml" />
<Page Include="CreateListDialog.xaml" />
<Page Include="DebugSteps.xaml" />
<Page Include="Images\Back.xaml" />
<Page Include="Images\CollapseAll.xaml" />
<Page Include="Images\Forward.xaml" />
<Page Include="Images\Open.xaml" />
<Page Include="Images\Refresh.xaml" />
<Page Include="Images\Search.xaml" />
<Page Include="Images\Sort.xaml" />
<Page Include="MainWindow.xaml" />
<Page Include="OpenFromGacDialog.xaml" />
<Page Include="OpenListDialog.xaml" />
@ -345,7 +352,6 @@ @@ -345,7 +352,6 @@
<Resource Include="Images\Indexer.png" />
<Resource Include="Images\Operator.png" />
<Resource Include="Images\Property.png" />
<Resource Include="Images\Find.png" />
<Resource Include="Images\Library.png" />
<Resource Include="Images\SubTypes.png" />
<Resource Include="Images\SuperTypes.png" />
@ -389,6 +395,34 @@ @@ -389,6 +395,34 @@
<ItemGroup>
<Page Update="@(Page)" SubType="Designer" Generator="MSBuild:Compile" />
<Page Update="Images\Back.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Images\CollapseAll.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Images\Forward.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Images\Open.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Images\Refresh.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Images\Search.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Images\Sort.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Options\DecompilerSettingsPanel.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>

BIN
ILSpy/Images/Back.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 243 B

20
ILSpy/Images/Back.xaml

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M15,8C15,11.866 11.866,15 8,15 4.134,15 1,11.866 1,8 1,4.134 4.134,1 8,1 11.866,1 15,4.134 15,8" />
<GeometryDrawing Brush="#FF00539C" Geometry="F1M4,8L7,5 9,5 7,7 12,7 12,9 7,9 9,11 7,11z M2,8C2,11.247 4.755,14 8,14 11.245,14 14,11.247 14,8 14,4.756 11.245,2 8,2 4.755,2 2,4.756 2,8" />
<GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M4,8L7,5 9,5 7,7 12,7 12,9 7,9 9,11 7,11z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

BIN
ILSpy/Images/CollapseAll.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 196 B

21
ILSpy/Images/CollapseAll.xaml

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M15,10L13,10 13,12 11,12 11,14 2,14 2,5 4,5 4,3 6,3 6,1 15,1z" />
<GeometryDrawing Brush="#FF424242" Geometry="F1M9,7L4,7 4,12 9,12z M10,13L3,13 3,6 10,6z M5,4L5,5 6,5 11,5 11,10 11,11 12,11 12,4z M14,2L14,9 13,9 13,8 13,3 8,3 7,3 7,2z" />
<GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M8,10L5,10 5,9 8,9z M4,12L9,12 9,7 4,7z" />
<GeometryDrawing Brush="#FF00539C" Geometry="F1M8,10L5,10 5,8.969 8,9z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

BIN
ILSpy/Images/Find.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

BIN
ILSpy/Images/Forward.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 B

After

Width:  |  Height:  |  Size: 252 B

20
ILSpy/Images/Forward.xaml

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M15,8C15,11.866 11.866,15 8,15 4.134,15 1,11.866 1,8 1,4.134 4.134,1 8,1 11.866,1 15,4.134 15,8" />
<GeometryDrawing Brush="#FF00539C" Geometry="F1M9,11L7,11 9,9 4,9 4,7 9,7 7,5 9,5 12,8z M8,2C4.755,2 2,4.756 2,8 2,11.247 4.755,14 8,14 11.245,14 14,11.247 14,8 14,4.756 11.245,2 8,2" />
<GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M9,11L7,11 9,9 4,9 4,7 9,7 7,5 9,5 12,8z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

54
ILSpy/Images/Images.cs

@ -21,6 +21,9 @@ using System.Windows.Media.Imaging; @@ -21,6 +21,9 @@ using System.Windows.Media.Imaging;
using System.Windows.Media;
using System.Windows;
using System.Collections.Generic;
using System.Windows.Controls;
using System.Windows.Markup;
using System.IO;
namespace ICSharpCode.ILSpy
{
@ -100,21 +103,62 @@ namespace ICSharpCode.ILSpy @@ -100,21 +103,62 @@ namespace ICSharpCode.ILSpy
private static readonly BitmapImage OverlayStatic = LoadBitmap("OverlayStatic");
public static object Load(object part, string icon)
{
if (icon.EndsWith(".png", StringComparison.OrdinalIgnoreCase))
return LoadImage(part, icon);
Uri uri = GetUri(part, icon + ".xaml");
if (ResourceExists(uri)) {
return LoadVector(part, icon);
}
return LoadImage(part, icon + ".png");
}
public static BitmapImage LoadImage(object part, string icon)
{
Uri uri = GetUri(part, icon);
BitmapImage image = new BitmapImage(uri);
image.Freeze();
return image;
}
public static Viewbox LoadVector(object part, string icon)
{
return (Viewbox)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false));
}
private static Uri GetUri(object part, string icon, bool absolute = true)
{
Uri uri;
var assembly = part.GetType().Assembly;
string prefix;
UriKind kind;
if (absolute) {
prefix = "pack://application:,,,/";
kind = UriKind.Absolute;
} else {
prefix = "/";
kind = UriKind.Relative;
}
if (assembly == typeof(Images).Assembly) {
uri = new Uri("pack://application:,,,/" + icon);
uri = new Uri(prefix + icon, kind);
} else {
var name = assembly.GetName();
uri = new Uri("pack://application:,,,/" + name.Name + ";v" + name.Version + ";component/" + icon);
uri = new Uri(prefix + name.Name + ";v" + name.Version + ";component/" + icon, kind);
}
BitmapImage image = new BitmapImage(uri);
image.Freeze();
return image;
return uri;
}
private static bool ResourceExists(Uri uri)
{
try {
Application.GetResourceStream(uri);
return true;
} catch (IOException) {
return false;
}
}
private static readonly TypeIconCache typeIconCache = new TypeIconCache();
private static readonly MemberIconCache memberIconCache = new MemberIconCache();

BIN
ILSpy/Images/Open.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 457 B

20
ILSpy/Images/Open.xaml

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M16,9L16,10.196 13.677,16 2,16C2,16 1.14,15.979 0.57,15.435 0.227,15.103 0,14.617 0,14L0,5C0,3.697,1.005,3,2,3L4.486,3 3.607,2.121 5.729,0 10.246,4.518 9.999,4.765 10.116,5 13,5C13.97,5,15,5.701,15,7L15,9z" />
<GeometryDrawing Brush="#FFDCB67A" Geometry="F1M14,10.0313L14,7.0313C14,6.0313,12.764,6.0313,13,6.0313L9.5,6.0313 9.244,5.5193 8.578,6.1863 9,7.0313 13,7.0313 13,10.0313 4,10.0313 2,15.0313 13,15.0313 15,10.0313z M2,15.0153L1.997,15.0153C1.94,15.0153,1,15.0013,1,14.0313L1,8.9593C1.286,9.2523,1.626,9.4873,2,9.6663z" />
<GeometryDrawing Brush="#FF00529C" Geometry="F1M8.832,4.5176L5.728,7.6216 5.021,6.9136 6.918,5.0176 3.5,5.0176C2.673,5.0176 2,5.6906 2,6.5176 2,7.3446 2.673,8.0176 3.5,8.0176L3.5,9.0176C2.122,9.0176 1,7.8966 1,6.5176 1,5.1396 2.122,4.0176 3.5,4.0176L6.918,4.0176 5.021,2.1216 5.728,1.4136z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

BIN
ILSpy/Images/Refresh.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 835 B

After

Width:  |  Height:  |  Size: 591 B

19
ILSpy/Images/Refresh.xaml

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M16,8C16,12.411 12.411,16 8,16 3.589,16 0,12.411 0,8 0,6.597 0.384,5.212 1.088,4L0,4 0,0 8,0 8,8 4,8C4,10.206 5.794,12 8,12 10.206,12 12,10.206 12,8 12,6.656 11.331,5.41 10.21,4.666L9.377,4.112 11.592,0.78 12.425,1.333C14.663,2.822,16,5.314,16,8" />
<GeometryDrawing Brush="#FF00529C" Geometry="F1M15,8C15,11.859 11.859,15 8,15 4.14,15 1,11.859 1,8 1,6.076 1.801,4.292 3.121,3L1,3 1,1 7,1 7,7 5,7 5,4.002C3.766,4.931 3,6.401 3,8 3,10.757 5.243,13 8,13 10.757,13 13,10.757 13,8 13,6.321 12.164,4.763 10.764,3.833L11.871,2.167C13.83,3.469,15,5.649,15,8" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

BIN
ILSpy/Images/Search.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 529 B

20
ILSpy/Images/Search.xaml

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M16,5.8335C16,9.0495 13.384,11.6665 10.167,11.6665 9.136,11.6665 8.144,11.3925 7.254,10.8675L2.561,15.5605C2.277,15.8435 1.9,16.0005 1.5,16.0005 1.1,16.0005 0.723000000000001,15.8435 0.439,15.5605 -0.146000000000001,14.9755 -0.146000000000001,14.0245 0.439,13.4395L5.133,8.7445C4.608,7.8555 4.333,6.8635 4.333,5.8335 4.333,2.6165 6.95,0.000500000000000611 10.167,0.000500000000000611 13.384,0.000500000000000611 16,2.6165 16,5.8335" />
<GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M14,5.8335C14,7.9475 12.28,9.6665 10.167,9.6665 8.053,9.6665 6.333,7.9475 6.333,5.8335 6.333,3.7195 8.053,2.0005 10.167,2.0005 12.28,2.0005 14,3.7195 14,5.8335" />
<GeometryDrawing Brush="#FF424242" Geometry="F1M10.167,9.667C8.053,9.667 6.334,7.947 6.334,5.834 6.334,3.72 8.053,2 10.167,2 12.28,2 14,3.72 14,5.834 14,7.947 12.28,9.667 10.167,9.667 M10.167,1C7.502,1 5.334,3.168 5.334,5.834 5.334,6.985 5.755,8.03 6.431,8.862L1.147,14.146C0.951000000000001,14.342 0.951000000000001,14.658 1.147,14.854 1.244,14.951 1.372,15 1.5,15 1.628,15 1.756,14.951 1.854,14.854L7.138,9.569C7.969,10.245 9.015,10.667 10.167,10.667 12.832,10.667 15,8.499 15,5.834 15,3.168 12.832,1 10.167,1" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

BIN
ILSpy/Images/Sort.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 356 B

21
ILSpy/Images/Sort.xaml

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
<!-- This file was generated by the AiToXaml tool.-->
<!-- Tool Version: 14.0.22307.0 -->
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Rectangle Width="16" Height="16">
<Rectangle.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M0,-0.000199999999999534L0,8.9998 1,8.9998 1,12.0008 2.586,12.0008 1,13.5858 1,15.9998 8,15.9998 8,13.0008 6.449,13.0008 8,12.0008 8,10.9998 12,14.9998 16,10.9998 16,4.9998 14,6.9998 14,3.0008 10,3.0008 10,6.9998 9,5.9998 9,-0.000199999999999534z" />
<GeometryDrawing Brush="#FF424242" Geometry="F1M7,7L5,2 4,2 2,7 3,7 3.399,6 5.601,6 6,7z M8,8L1,8 1,1 8,1z M4.5,3.25L5.2,5 3.8,5z M2,11L5,11 2,14 2,15 7,15 7,14 4.013,14 7,11.051 6.952,11 7,11 7,10 2,10z" />
<GeometryDrawing Brush="#FFEFEFF0" Geometry="F1M3.7998,5L4.4998,3.25 5.1998,5z M5.9998,7L6.9998,7 4.9998,2 3.9998,2 1.9998,7 2.9998,7 3.3998,6 5.6008,6z" />
<GeometryDrawing Brush="#FF00529C" Geometry="F1M15,8L15,10 12,13 9,10 9,8 11,10 11,4 13,4 13,10z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>

30
ILSpy/MainWindow.xaml.cs

@ -139,15 +139,19 @@ namespace ICSharpCode.ILSpy @@ -139,15 +139,19 @@ namespace ICSharpCode.ILSpy
Button MakeToolbarItem(Lazy<ICommand, IToolbarCommandMetadata> command)
{
object image = Images.Load(command.Value, command.Metadata.ToolbarIcon);
if (!(image is Viewbox)) {
image = new Image {
Width = 16,
Height = 16,
Source = (ImageSource)image
};
}
return new Button {
Command = CommandWrapper.Unwrap(command.Value),
ToolTip =Properties.Resources.ResourceManager.GetString( command.Metadata.ToolTip),
ToolTip = Properties.Resources.ResourceManager.GetString(command.Metadata.ToolTip),
Tag = command.Metadata.Tag,
Content = new Image {
Width = 16,
Height = 16,
Source = Images.LoadImage(command.Value, command.Metadata.ToolbarIcon)
}
Content = image
};
}
#endregion
@ -173,11 +177,15 @@ namespace ICSharpCode.ILSpy @@ -173,11 +177,15 @@ namespace ICSharpCode.ILSpy
if (!string.IsNullOrEmpty(GetResourceString(entry.Metadata.Header)))
menuItem.Header = GetResourceString(entry.Metadata.Header);
if (!string.IsNullOrEmpty(entry.Metadata.MenuIcon)) {
menuItem.Icon = new Image {
Width = 16,
Height = 16,
Source = Images.LoadImage(entry.Value, entry.Metadata.MenuIcon)
};
object image = Images.Load(entry.Value, entry.Metadata.MenuIcon);
if (!(image is Viewbox)) {
image = new Image {
Width = 16,
Height = 16,
Source = (ImageSource)image
};
}
menuItem.Icon = image;
}
menuItem.IsEnabled = entry.Metadata.IsEnabled;

4
ILSpy/Search/SearchPane.cs

@ -398,8 +398,8 @@ namespace ICSharpCode.ILSpy @@ -398,8 +398,8 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header =nameof(Properties.Resources.Search), MenuIcon = "Images/Find.png", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)]
[ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Find.png", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)]
[ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header =nameof(Properties.Resources.Search), MenuIcon = "Images/Search", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)]
[ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Search", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)]
sealed class ShowSearchCommand : CommandWrapper
{
public ShowSearchCommand()

Loading…
Cancel
Save