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" "/../resources.rcc"
QResource.registerResource(app.applicationDirPath & resources) QResource.registerResource(app.applicationDirPath & resources)
let statusSvg = let statusAppIcon =
if defined(windows) and getEnv("NIM_STATUS_CLIENT_DEV").string == "": if defined(macosx):
"/../resources/status.svg" if getEnv("NIM_STATUS_CLIENT_DEV").string == "":
"/../Resources/status-icon.icns"
else: else:
"/../status.svg" "/../status-icon.icns"
app.icon(app.applicationDirPath & statusSvg) elif defined(windows) and getEnv("NIM_STATUS_CLIENT_DEV").string == "":
"/../resources/status.svg"
else:
"/../status.svg"
app.icon(app.applicationDirPath & statusAppIcon)
var i18nPath = "" var i18nPath = ""
if (getEnv("NIM_STATUS_CLIENT_DEV").string != ""): if (getEnv("NIM_STATUS_CLIENT_DEV").string != ""):