fix: macos tray icon size

This commit is contained in:
wicast 2025-07-08 11:53:37 +08:00
parent 0666d4677e
commit a89f24d2f1
3 changed files with 9 additions and 2 deletions

View file

@ -17,7 +17,11 @@ module.exports = function (options = {}) {
resetMenu(isServerRunning)
})
tray = new Tray(__dirname + '/../assets/logo.png')
var icon = __dirname + '/../assets/logo.png'
if (process.platform === 'darwin') {
var icon = __dirname + '/../assets/logo_16x16.png'
}
tray = new Tray(icon)
contextMenu = Menu.buildFromTemplate([
{
label: 'Open/Hide', click: () => {
@ -33,7 +37,6 @@ module.exports = function (options = {}) {
{
label: 'Start/Stop',
click: () => {
console.log(isServerRunning)
if (isServerRunning) {
ipcMain.emit('stop');
} else {