From b576ee300b4d10663e06e6fcd9902f630a1f4a49 Mon Sep 17 00:00:00 2001 From: CoenraadS Date: Thu, 17 Jul 2014 19:37:51 +0200 Subject: [PATCH] Save icon's as .bmp .ico hack was unneccassary. --- Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs b/Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs index 749ef4a808..6d3119198b 100644 --- a/Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs +++ b/Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs @@ -35,6 +35,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel private List controlPanelItems; private string iconFolder; + private string fileType; #endregion Properties @@ -43,12 +44,13 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel this.context = context; controlPanelItems = WindowsControlPanelItems.List.Create(48); iconFolder = @"Images\ControlPanelIcons\"; + fileType = ".bmp"; foreach (ControlPanelItem item in controlPanelItems) { - if (!File.Exists(iconFolder + item.ApplicationName + ".ico")) + if (!File.Exists(iconFolder + item.ApplicationName + fileType)) { - item.Icon.ToBitmap().Save(iconFolder + item.ApplicationName + ".ico"); //Wierd hack to not lose quality when saving as .ico + item.Icon.ToBitmap().Save(iconFolder + item.ApplicationName + fileType); } } } @@ -72,7 +74,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel { Title = item.LocalizedString, SubTitle = item.InfoTip, - IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + ".ico", + IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + fileType, Action = e => { try @@ -93,7 +95,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel { Title = item.LocalizedString, SubTitle = item.InfoTip, - IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + ".ico", + IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + fileType, Action = e => { try