diff --git a/src/BizHawk.Client.EmuHawk/FormBase.cs b/src/BizHawk.Client.EmuHawk/FormBase.cs index a0ca4c8b31..e122057623 100644 --- a/src/BizHawk.Client.EmuHawk/FormBase.cs +++ b/src/BizHawk.Client.EmuHawk/FormBase.cs @@ -13,6 +13,16 @@ namespace BizHawk.Client.EmuHawk { private const string PLACEHOLDER_TITLE = "(will take value from WindowTitle/WindowTitleStatic)"; + /// removes transparency from an image by combining it with a solid background + public static Image FillImageBackground(Image img, Color c) + { + Bitmap result = new(width: img.Width, height: img.Height); + using var g = Graphics.FromImage(result); + g.Clear(c); + g.DrawImage(img, x: 0, y: 0, width: img.Width, height: img.Height); + return result; + } + /// /// Under Mono, SystemColors.Control returns an ugly beige.
/// This method recursively replaces the of the given (can be a ) with diff --git a/src/BizHawk.Client.EmuHawk/config/FirmwareConfig.cs b/src/BizHawk.Client.EmuHawk/config/FirmwareConfig.cs index ce8013f746..1b69d4d6be 100644 --- a/src/BizHawk.Client.EmuHawk/config/FirmwareConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/FirmwareConfig.cs @@ -145,7 +145,13 @@ namespace BizHawk.Client.EmuHawk = tbbOpenFolder.Image = Properties.Resources.Placeholder; // prep ImageList for ListView - foreach (var img in StatusIcons.Values) imageList1.Images.Add(img); + var iconList = StatusIcons.Values; + if (OSTailoredCode.IsUnixHost) // remove crusty artifacts + { + var bg = lvFirmware.BackColor; + iconList = iconList.Select(img => FormBase.FillImageBackground(img, bg)); + } + foreach (var img in iconList) imageList1.Images.Add(img); _listViewSorter = new ListViewSorter(-1);