Merge pull request #114 from ente-io/macos-tray-icon
Use a template task bar icon on macOS
This commit is contained in:
commit
469b509b13
4 changed files with 7 additions and 3 deletions
BIN
build/taskbar-icon-Template.png
Normal file
BIN
build/taskbar-icon-Template.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 989 B |
BIN
build/taskbar-icon-Template@2x.png
Normal file
BIN
build/taskbar-icon-Template@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
build/taskbar-icon-Template@3x.png
Normal file
BIN
build/taskbar-icon-Template@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 607 B |
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue