Merge pull request #368 from ImKventis/master

Maintain custom set icon
This commit is contained in:
kangyu-california 2025-01-06 10:50:13 -08:00 committed by GitHub
commit 3c6f053b00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -476,7 +476,9 @@ if not errorlevel 1 goto wait_to_finish";
else
{
NotifyIcon ni = systrayForm.notifyIconMain;
ni.Icon = BusyIcon;
if (!systrayForm.toggleIcon) {
ni.Icon = BusyIcon;
}
if (silent)
return;
@ -501,7 +503,10 @@ if not errorlevel 1 goto wait_to_finish";
else
{
NotifyIcon ni = systrayForm.notifyIconMain;
ni.Icon = IdleIcon;
if (!systrayForm.toggleIcon)
{
ni.Icon = IdleIcon;
}
if (Gui)
{

View file

@ -18,7 +18,7 @@ namespace PersistentWindows.SystrayShell
private const int MaxSnapshots = 38; // 0-9, a-z, ` and final one for undo
private bool pauseAutoRestore = false;
private bool toggleIcon = false;
public bool toggleIcon = false;
private int skipUpgradeCounter = 0;
private bool pauseUpgradeCounter = false;