mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-29 23:10:35 +00:00
windows tray icon
This commit is contained in:
@@ -146,7 +146,13 @@ function createWindow() {
|
||||
}
|
||||
|
||||
function createTray() {
|
||||
tray = new Tray(path.join(__dirname, 'tray-iconTemplate.png'));
|
||||
// Use template icon for macOS (black with transparency, auto-adapts to theme)
|
||||
// Use colored icon for Windows
|
||||
const trayIconPath = process.platform === 'darwin'
|
||||
? path.join(__dirname, 'tray-iconTemplate.png')
|
||||
: path.join(__dirname, 'tray-icon-windows.png');
|
||||
|
||||
tray = new Tray(trayIconPath);
|
||||
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
"preload.js",
|
||||
"icon.png",
|
||||
"tray-iconTemplate.png",
|
||||
"tray-iconTemplate@2x.png"
|
||||
"tray-iconTemplate@2x.png",
|
||||
"tray-icon-windows.png"
|
||||
],
|
||||
"mac": {
|
||||
"category": "public.app-category.developer-tools",
|
||||
|
||||
BIN
electron/tray-icon-windows.png
Normal file
BIN
electron/tray-icon-windows.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user