diff --git a/assets/icons/16x16.png b/assets/icons/16x16.png new file mode 100644 index 000000000..39873d180 Binary files /dev/null and b/assets/icons/16x16.png differ diff --git a/assets/icons/IconTemplate.png b/assets/icons/IconTemplate.png new file mode 100644 index 000000000..8c4a9139e Binary files /dev/null and b/assets/icons/IconTemplate.png differ diff --git a/assets/icons/IconTemplate@2x.png b/assets/icons/IconTemplate@2x.png new file mode 100644 index 000000000..0b7996580 Binary files /dev/null and b/assets/icons/IconTemplate@2x.png differ diff --git a/src/main/index.ts b/src/main/index.ts index 34e4ce74b..09f54053c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -187,10 +187,20 @@ const createWinThumbarButtons = () => { }; const createTray = () => { - tray = - isLinux() || isMacOS() - ? new Tray(getAssetPath('icons/icon.png')) - : new Tray(getAssetPath('icons/icon.ico')); + let trayIcon: Electron.NativeImage | string; + + if (isMacOS()) { + const iconPath = getAssetPath('icons/IconTemplate.png'); + const icon = nativeImage.createFromPath(iconPath); + icon.setTemplateImage(true); + trayIcon = icon; + } else if (isLinux()) { + trayIcon = getAssetPath('icons/icon.png'); + } else { + trayIcon = getAssetPath('icons/icon.ico'); + } + + tray = new Tray(trayIcon); const contextMenu = Menu.buildFromTemplate([ {