Skip to content

Commit

Permalink
Add custom suspended icon
Browse files Browse the repository at this point in the history
  • Loading branch information
benallred committed Jan 7, 2016
1 parent f31e309 commit 95fdcdf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Modules/Tray.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -109,32 +109,35 @@ class Tray

tray_Suspend(itemName, itemPos, menuName)
{
Suspend, Toggle

if (A_IsSuspended)
{
Menu, Tray, Rename, Res&ume, S&uspend
Menu, Tray, Rename, S&uspend, Res&ume
if (A_IsCompiled)
{
Menu, Tray, Icon, S&uspend, % A_ScriptName, 10
Menu, Tray, Icon, Res&ume, % A_ScriptName, 11
; SnapX_Suspended.ico is embedded in the exe in place of the default suspended icon
}
else
{
Menu, Tray, Icon, S&uspend, Resources\Suspend.ico
Menu, Tray, Icon, Res&ume, Resources\Resume.ico
Menu, Tray, Icon, Resources\SnapX_Suspended.ico, , 1
}
}
else
{
Menu, Tray, Rename, S&uspend, Res&ume
Menu, Tray, Rename, Res&ume, S&uspend
if (A_IsCompiled)
{
Menu, Tray, Icon, Res&ume, % A_ScriptName, 11
Menu, Tray, Icon, S&uspend, % A_ScriptName, 10
}
else
{
Menu, Tray, Icon, Res&ume, Resources\Resume.ico
Menu, Tray, Icon, S&uspend, Resources\Suspend.ico
Menu, Tray, Icon, Resources\SnapX.ico, , 0
}
}

Suspend, Toggle
}

tray_Exit(itemName, itemPos, menuName)
Expand Down
Binary file added Resources/SnapX_Suspended.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions SnapX.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; @ Ahk2Exe-SetDescription ; this is set in Settings.ahk
; @ Ahk2Exe-SetVersion ; this is set in Build.ahk

; icon 4
;@Ahk2Exe-AddResource Resources\SnapX_Suspended.ico, 206
; icon 6
;@Ahk2Exe-AddResource Resources\About.ico
; icon 7
Expand Down

0 comments on commit 95fdcdf

Please sign in to comment.