Merge pull request #114 from ente-io/macos-tray-icon

Use a template task bar icon on macOS
This commit is contained in:
Manav 2022-12-09 13:25:31 +05:30 committed by GitHub
commit 469b509b13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

View file

@ -22,9 +22,13 @@ export function handleUpdates(mainWindow: BrowserWindow) {
}
}
export function setupTrayItem(mainWindow: BrowserWindow) {
const trayImgPath = isDev
? 'build/taskbar-icon.png'
: path.join(process.resourcesPath, 'taskbar-icon.png');
const iconName = isPlatformMac
? 'taskbar-icon-Template.png'
: 'taskbar-icon.png';
const trayImgPath = path.join(
isDev ? 'build' : process.resourcesPath,
iconName
);
const trayIcon = nativeImage.createFromPath(trayImgPath);
const tray = new Tray(trayIcon);
tray.setToolTip('ente');