Skip to content

Commit

Permalink
fix: resolve #18
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick committed Jul 3, 2023
1 parent a4f6d22 commit e64b2ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Application.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cors from '@koa/cors';
import alsong from 'alsong';
import { app, BrowserWindow, Menu, dialog, screen, shell, Tray, ipcMain } from 'electron';
import { app, BrowserWindow, Menu, dialog, screen, shell, Tray, ipcMain, nativeImage } from 'electron';
import { autoUpdater } from 'electron-updater';
import glasstron from 'glasstron';
import Koa from 'koa';
Expand Down Expand Up @@ -65,7 +65,12 @@ class Application {
}

initTray() {
this.tray = new Tray(getFile('./assets/icon_music.png'));
const trayIcon = nativeImage.createFromPath(getFile('./assets/icon_square.png'));
trayIcon.resize({
width: 16,
height: 16,
});
this.tray = new Tray(trayIcon);
const contextMenu = Menu.buildFromTemplate([
{
type: 'normal',
Expand Down

0 comments on commit e64b2ee

Please sign in to comment.