Skip to content

Commit

Permalink
Fixes #1925
Browse files Browse the repository at this point in the history
  • Loading branch information
msevestre committed Mar 18, 2023
1 parent 91aef0a commit 2aef012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/OSPSuite.Assets.Images/ApplicationIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,14 @@ private static SvgImage bytesToImage(byte[] bytes)

public static implicit operator SvgImage(ApplicationIcon icon) => icon.ToSvgImage();

public static implicit operator Image(ApplicationIcon icon) => icon.ToImage();

public virtual Image ToImage() => ToImage(IconSizes.Size16x16);

public virtual Image ToImage(IconSize imageSize)
{
return _bitmap?.Render(imageSize, null)
?? new Bitmap(imageSize.Width, imageSize.Height);
/*Bitmap target = new Bitmap(
(int)imageSize.Width,
(int)imageSize.Height);
using (Graphics g = Graphics.FromImage(target))
{
_bitmap.RenderToGraphics(g,
SvgPaletteHelper.GetSvgPalette(LookAndFeel, ObjectState.Normal));
}*/
}

public virtual SvgImage ToSvgImage() => _image;
Expand Down
2 changes: 1 addition & 1 deletion src/OSPSuite.Core/Domain/ValidationMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public virtual void AddDetail(string detail)
}

/// <summary>
/// Returns details if available on the error (usefull to aggregate more than one error for a given object)
/// Returns details if available on the error (useful to aggregate more than one error for a given object)
/// </summary>
public virtual IEnumerable<string> Details => _details;
}
Expand Down

0 comments on commit 2aef012

Please sign in to comment.