mirror of
https://github.com/sascha-hemi/homeassistant-desktop.git
synced 2026-03-20 23:04:15 +01:00
Support macOS dark mode tray icon
https://github.com/electron/electron/blob/master/docs/api/native-image.md#template-image
This commit is contained in:
2
app.js
2
app.js
@@ -213,7 +213,7 @@ const showWindow = () => {
|
||||
};
|
||||
|
||||
const createTray = () => {
|
||||
tray = new Tray(process.platform === 'win32' ? `${__dirname}/assets/IconWin.png` : `${__dirname}/assets/Icon.png`);
|
||||
tray = new Tray(process.platform === 'win32' ? `${__dirname}/assets/IconWin.png` : `${__dirname}/assets/IconTemplate.png`);
|
||||
|
||||
tray.on('click', () => {
|
||||
if (window.isVisible()) window.hide(); else showWindow();
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Reference in New Issue
Block a user