diff --git a/Makefile b/Makefile index 565d30446..a40d65ccd 100644 --- a/Makefile +++ b/Makefile @@ -309,7 +309,7 @@ $(STATUS_CLIENT_DMG): nim_status_client $(DMG_TOOL) cp Info.plist $(MACOS_OUTER_BUNDLE)/Contents/ cp bin/nim_status_client $(MACOS_OUTER_BUNDLE)/Contents/MacOS/ cp status.icns $(MACOS_OUTER_BUNDLE)/Contents/Resources/ - cp status.svg $(MACOS_OUTER_BUNDLE)/Contents/ + cp status-macos.svg $(MACOS_OUTER_BUNDLE)/Contents/ cp -R resources.rcc $(MACOS_OUTER_BUNDLE)/Contents/ cp -R $(FLEETS) $(MACOS_OUTER_BUNDLE)/Contents/ mkdir -p $(MACOS_OUTER_BUNDLE)/Contents/i18n diff --git a/src/nim_status_client.nim b/src/nim_status_client.nim index d96c31187..7a675fc83 100644 --- a/src/nim_status_client.nim +++ b/src/nim_status_client.nim @@ -56,14 +56,19 @@ proc mainProc() = QResource.registerResource(app.applicationDirPath & resources) let statusAppIcon = - if defined(macosx): - "" # not used in macOS - elif defined(windows) and defined(production): - "/../resources/status.svg" - elif defined(development): - "/../status-dev.svg" + if defined(production): + if defined(macosx): + "" # not used in macOS + elif defined(windows): + "/../resources/status.svg" + else: + "/../status.svg" else: - "/../status.svg" + if defined(macosx): + "" # not used in macOS + else: + "/../status-dev.svg" + if not defined(macosx): app.icon(app.applicationDirPath & statusAppIcon) @@ -201,6 +206,9 @@ proc mainProc() = engine.setRootContextProperty("signals", signalController.variant) engine.setRootContextProperty("mailserver", mailserverController.variant) + var prValue = newQVariant(if defined(production): true else: false) + engine.setRootContextProperty("production", prValue) + engine.load(newQUrl("qrc:///main.qml")) # Please note that this must use the `cdecl` calling convention because diff --git a/status-dev.svg b/status-dev.svg index f8c1cd796..5d19b08d5 100644 --- a/status-dev.svg +++ b/status-dev.svg @@ -1,94 +1,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/status-macos.ico b/status-macos.ico new file mode 100644 index 000000000..c17d5972f Binary files /dev/null and b/status-macos.ico differ diff --git a/status.ico b/status.ico index c17d5972f..1d08c730d 100644 Binary files a/status.ico and b/status.ico differ diff --git a/status.svg b/status.svg index 9f350a14e..a58455db0 100644 --- a/status.svg +++ b/status.svg @@ -1,94 +1,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/ui/main.qml b/ui/main.qml index 631608490..b6a5b546d 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -129,7 +129,20 @@ StatusWindow { SystemTrayIcon { id: systemTray visible: true - icon.source: "shared/img/status-logo.svg" + icon.source: { + if (production){ + if(Qt.platform.os == "osx") + return "shared/img/status-logo-round-rect.svg" + else + return "shared/img/status-logo-circle.svg" + } + else { + if(Qt.platform.os == "osx") + return "shared/img/status-logo-dev-round-rect.svg" + else + return "shared/img/status-logo-dev-circle.svg" + } + } menu: Menu { MenuItem { visible: !applicationWindow.visible diff --git a/ui/shared/img/status-logo-circle.svg b/ui/shared/img/status-logo-circle.svg new file mode 100644 index 000000000..a58455db0 --- /dev/null +++ b/ui/shared/img/status-logo-circle.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ui/shared/img/status-logo-dev-circle.svg b/ui/shared/img/status-logo-dev-circle.svg new file mode 100644 index 000000000..5d19b08d5 --- /dev/null +++ b/ui/shared/img/status-logo-dev-circle.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ui/shared/img/status-logo-dev-round-rect.svg b/ui/shared/img/status-logo-dev-round-rect.svg new file mode 100644 index 000000000..a12fc6157 --- /dev/null +++ b/ui/shared/img/status-logo-dev-round-rect.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/shared/img/status-logo.svg b/ui/shared/img/status-logo-round-rect.svg similarity index 100% rename from ui/shared/img/status-logo.svg rename to ui/shared/img/status-logo-round-rect.svg