Browse Source

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

pull/30/head
Siegfried Pammer 13 years ago
parent
commit
dc3da0a8e9
  1. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs
  2. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs

@ -110,7 +110,7 @@ namespace ICSharpCode.FormsDesigner.Gui @@ -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;
}

4
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ComponentLibraryLoader.cs

@ -346,7 +346,7 @@ namespace ICSharpCode.FormsDesigner.Gui @@ -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 @@ -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);

Loading…
Cancel
Save