Fix macOS tray icon (#1600)

* add 32x32 icon for macOS tray

* add 16x16 image

* add black/transparent icon
This commit is contained in:
Jeff
2026-01-23 21:10:49 -08:00
committed by GitHub
parent a50984d2cb
commit c79e041777
4 changed files with 14 additions and 4 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

+14 -4
View File
@@ -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([
{