Skip to content

Commit

Permalink
Update Icon
Browse files Browse the repository at this point in the history
Fixes #287
  • Loading branch information
Antoine Aflalo committed Jun 7, 2018
1 parent adef521 commit fdcaf6c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions SoundSwitch/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions SoundSwitch/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<data name="SoundSwitchLogoBlue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Blue Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SoundSwitchLogoWhite" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\White Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Switch_Logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Switch-Logo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added SoundSwitch/Resources/Switch-Logo.ico
Binary file not shown.
Binary file removed SoundSwitch/Resources/White Icon.ico
Binary file not shown.
4 changes: 3 additions & 1 deletion SoundSwitch/SoundSwitch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Blue Icon.ico</ApplicationIcon>
<ApplicationIcon>Switch-Logo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
Expand Down Expand Up @@ -515,6 +515,8 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="Resources\Switch-Logo.ico" />
<Content Include="Switch-Logo.ico" />
<None Include="Resources\White Icon.ico" />
<None Include="packages.config" />
<None Include="Resources\donate-16.png" />
Expand Down
Binary file added SoundSwitch/Switch-Logo.ico
Binary file not shown.
9 changes: 4 additions & 5 deletions SoundSwitch/Util/TrayIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public sealed class TrayIcon : IDisposable
private static readonly Bitmap RessourceHelpSmallBitmap = Resources.HelpSmall;
private static readonly Bitmap RessourceExitBitmap = Resources.exit;
private static readonly Icon RessourceUpdateIconBitmap = Resources.UpdateIcon;
private static readonly Icon RessourceSoundSwitchIconWhite = Resources.SoundSwitchLogoWhite;
private static readonly Icon RessourceSoundSwitchIconBlue = Resources.SoundSwitchLogoBlue;
private static readonly Icon SoundSwitchLogoIcon = Resources.Switch_Logo;

private readonly ContextMenuStrip _selectionMenu = new ContextMenuStrip();
private readonly ContextMenuStrip _settingsMenu = new ContextMenuStrip();
Expand Down Expand Up @@ -143,7 +142,7 @@ public void UpdateIcon()
{
if (AppConfigs.Configuration.KeepSystrayIcon)
{
ReplaceIcon(RessourceSoundSwitchIconWhite);
ReplaceIcon(SoundSwitchLogoIcon);
return;
}

Expand All @@ -169,7 +168,7 @@ private void PopulateSettingsMenu()
var readmeHtml = Path.Combine(applicationDirectory, "Readme.html");
_settingsMenu.Items.Add(
Application.ProductName + ' ' + AssemblyUtils.GetReleaseState() + " (" + Application.ProductVersion +
")", RessourceSoundSwitchIconBlue.ToBitmap());
")", SoundSwitchLogoIcon.ToBitmap());
_settingsMenu.Items.Add("-");
_settingsMenu.Items.Add(TrayIconStrings.playbackDevices, RessourcePlaybackDevicesBitmap,
(sender, e) => { Process.Start(new ProcessStartInfo("control", "mmsys.cpl sounds")); });
Expand Down Expand Up @@ -260,7 +259,7 @@ private void StartAnimationIconUpdate()
_animationTimer.Tick += (sender, args) =>
{
ReplaceIcon(tick == 0
? RessourceSoundSwitchIconWhite
? SoundSwitchLogoIcon
: RessourceUpdateIconBitmap);
tick = ++tick % 2;
};
Expand Down

0 comments on commit fdcaf6c

Please sign in to comment.