Skip to content
This repository was archived by the owner on Jan 14, 2022. It is now read-only.

Commit e70c9c4

Browse files
committed
fixed big tray icon on macOS
1 parent f2b9fbc commit e70c9c4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/app-tray.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
const { Menu, Tray, nativeImage } = require('electron')
22
const path = require('path')
3-
3+
const isOSX = process.platform === 'darwin'
44
let tray = null
55

66
function createTray (app, mainWindow) {
7+
const icon = isOSX ? 'icon18.png' : 'icon512.png'
78
tray = new Tray(
89
nativeImage.createFromPath(
9-
path.join(__dirname, '..', 'resources', 'icon', 'icon512.png')
10+
path.join(__dirname, '..', 'resources', 'icon', icon)
1011
)
1112
)
1213

resources/icon/icon18.png

1.13 KB
Loading

0 commit comments

Comments
 (0)