From e3f3f63270a6bd9d00c7499a2963484eac69d80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Wed, 14 Dec 2022 21:18:57 +0100 Subject: [PATCH] Change notify icon to white for `FanControl` --- FanControl/FanControlForm.cs | 3 + .../PublishProfiles/FolderProfile.pubxml | 13 -- FanControl/Resources.Designer.cs | 83 ++++++++++++ FanControl/Resources.resx | 127 ++++++++++++++++++ .../fan-white.ico} | Bin FanControl/Resources/fan.ico | Bin 0 -> 2191 bytes 6 files changed, 213 insertions(+), 13 deletions(-) delete mode 100644 FanControl/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 FanControl/Resources.Designer.cs create mode 100644 FanControl/Resources.resx rename FanControl/{FanControl-white.ico => Resources/fan-white.ico} (100%) create mode 100644 FanControl/Resources/fan.ico diff --git a/FanControl/FanControlForm.cs b/FanControl/FanControlForm.cs index 58d93bc..8a80502 100644 --- a/FanControl/FanControlForm.cs +++ b/FanControl/FanControlForm.cs @@ -34,6 +34,7 @@ namespace FanControl notifyIcon.Text = Text; notifyIcon.Visible = true; + notifyIcon.Icon = WindowsDarkMode.IsDarkModeEnabled ? Resources.fan_white : Resources.fan; TopMost = Settings.Default.AlwaysOnTop; toolStripMenuItemAlwaysOnTop.Checked = TopMost; @@ -162,6 +163,8 @@ namespace FanControl private void propertyGridUpdateTimer_Tick(object sender, EventArgs e) { + notifyIcon.Icon = WindowsDarkMode.IsDarkModeEnabled ? Resources.fan_white : Resources.fan; + if (!Visible) return; diff --git a/FanControl/Properties/PublishProfiles/FolderProfile.pubxml b/FanControl/Properties/PublishProfiles/FolderProfile.pubxml deleted file mode 100644 index 5af4093..0000000 --- a/FanControl/Properties/PublishProfiles/FolderProfile.pubxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Release - Any CPU - bin\publish\ - FileSystem - <_TargetId>Folder - - \ No newline at end of file diff --git a/FanControl/Resources.Designer.cs b/FanControl/Resources.Designer.cs new file mode 100644 index 0000000..91cfc18 --- /dev/null +++ b/FanControl/Resources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FanControl { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FanControl.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon fan { + get { + object obj = ResourceManager.GetObject("fan", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon fan_white { + get { + object obj = ResourceManager.GetObject("fan_white", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + } +} diff --git a/FanControl/Resources.resx b/FanControl/Resources.resx new file mode 100644 index 0000000..6cc159e --- /dev/null +++ b/FanControl/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\fan.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\fan-white.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/FanControl/FanControl-white.ico b/FanControl/Resources/fan-white.ico similarity index 100% rename from FanControl/FanControl-white.ico rename to FanControl/Resources/fan-white.ico diff --git a/FanControl/Resources/fan.ico b/FanControl/Resources/fan.ico new file mode 100644 index 0000000000000000000000000000000000000000..a5aef5b920cc03c6683a7021834cf345693e1b93 GIT binary patch literal 2191 zcmV;A2ypiR00962000000096X0C@-i02TlM0EtjeM-2)Z3IG5A4M|8uQUCw|KmY&$ zKnMl^0063Kaozv`00DDSM?wIu&K&6g00=WlL_t(|UgcYFY*W`2|Gj5yH)*1x#rZ(hY-NwFg>6Wf!ivO)rbt~Hfh9_t zeP9z^f)Xi{jgUh}lxSJPl&~o@33c#4IrF>IwQS3F{O3OVJuhhILq7PObM866d+#~- zoO{FJe?X0mjVIl1H@0rw`jfG-vCXL_Y}vBqZ{y?RAMe?-XLfja_!B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