1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Using trayTemplate icon

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2020-12-01 15:43:08 +03:00
parent 832f29f666
commit c8827e3342
4 changed files with 2 additions and 5 deletions

BIN
build/tray/trayTemplate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -16,14 +16,11 @@ import { exitApp } from "./exit-app";
// note: instance of Tray should be saved somewhere, otherwise it disappears
export let tray: Tray;
// refresh icon when MacOS dark/light theme has changed
nativeTheme?.on("updated", () => tray?.setImage(getTrayIcon()));
export function getTrayIcon(isDark = nativeTheme.shouldUseDarkColors): string {
export function getTrayIcon(): string {
return path.resolve(
__static,
isDevelopment ? "../build/tray" : "icons", // copied within electron-builder extras
`tray_icon${isDark ? "_dark" : ""}.png`
"trayTemplate.png"
);
}