mirror of
https://github.com/sascha-hemi/homeassistant-desktop.git
synced 2026-03-21 00:04:12 +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 = () => {
|
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', () => {
|
tray.on('click', () => {
|
||||||
if (window.isVisible()) window.hide(); else showWindow();
|
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