fix: on macOS use status-icon.icns instead of status.svg when setting app.icon()

This commit is contained in:
Michael Bradley, Jr 2020-09-17 15:11:31 -05:00
parent 7c116f8ea7
commit dcd5766205
No known key found for this signature in database
GPG Key ID: D0307DBCF21A9A58
1 changed files with 10 additions and 5 deletions

View File

@ -32,12 +32,17 @@ proc mainProc() =
"/../resources.rcc"
QResource.registerResource(app.applicationDirPath & resources)
let statusSvg =
if defined(windows) and getEnv("NIM_STATUS_CLIENT_DEV").string == "":
"/../resources/status.svg"
let statusAppIcon =
if defined(macosx):
if getEnv("NIM_STATUS_CLIENT_DEV").string == "":
"/../Resources/status-icon.icns"
else:
"/../status.svg"
app.icon(app.applicationDirPath & statusSvg)
"/../status-icon.icns"
elif defined(windows) and getEnv("NIM_STATUS_CLIENT_DEV").string == "":
"/../resources/status.svg"
else:
"/../status.svg"
app.icon(app.applicationDirPath & statusAppIcon)
var i18nPath = ""
if (getEnv("NIM_STATUS_CLIENT_DEV").string != ""):