From dc3da0a8e95367d67a26ab5db221c52ec017c713 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 16 Nov 2012 23:43:23 +0100 Subject: [PATCH] fixed SD-1656 - Tools window does not show ToolboxBitmaps by applying suggestion from http://community.sharpdevelop.net/forums/t/16404.aspx, which seems to be a good approximation of what VS is doing --- .../FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs | 2 +- .../FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs index f6db85ed48..e70fbefc58 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs @@ -110,7 +110,7 @@ namespace ICSharpCode.FormsDesigner.Gui ToolboxBitmapAttribute toolboxBitmapAttribute = (ToolboxBitmapAttribute)attr; images[t.FullName + ".bmp"] = il.Images.Count; Bitmap b = new Bitmap(toolboxBitmapAttribute.GetImage(t)); - b.MakeTransparent(); + b.MakeTransparent(Color.Fuchsia); il.Images.Add(b); break; } diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs index 1bfa0d2537..b71a8cee2c 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs @@ -346,7 +346,7 @@ namespace ICSharpCode.FormsDesigner.Gui if (attr is ToolboxBitmapAttribute) { ToolboxBitmapAttribute toolboxBitmapAttribute = (ToolboxBitmapAttribute)attr; b = new Bitmap(toolboxBitmapAttribute.GetImage(type)); - b.MakeTransparent(); + b.MakeTransparent(Color.Fuchsia); break; } } @@ -356,7 +356,7 @@ namespace ICSharpCode.FormsDesigner.Gui Stream imageStream = asm.GetManifestResourceStream(component.FullName + ".bmp"); if (imageStream != null) { b = new Bitmap(Image.FromStream(imageStream)); - b.MakeTransparent(); + b.MakeTransparent(Color.Fuchsia); } } catch (Exception e) { ICSharpCode.Core.LoggingService.Warn("ComponentLibraryLoader.GetIcon: " + e.Message);