Skip to content

Commit

Permalink
6.1.116
Browse files Browse the repository at this point in the history
🐞 修正
macOS 應用程式Tray圖標
  • Loading branch information
yayacat committed Aug 10, 2024
1 parent 22947d0 commit bf0b816
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions TREM.Electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1008,15 +1008,7 @@ function trayIcon() {
}

const iconPath = path.join(__dirname, process.platform === "darwin" ? "TREM.png" : "TREM.ico");
let trayIconPath = nativeImage.createFromPath(iconPath);

if (trayIconPath.isEmpty()) {
console.warn(iconPath);
console.warn("Icon is empty, trying alternative method");
trayIconPath = nativeImage.createFromNamedImage("NSImageNameUser");
}

tray = new Tray(trayIconPath);
tray = new Tray(nativeImage.createFromPath(iconPath));


tray.setIgnoreDoubleClickEvents(true);
Expand Down

0 comments on commit bf0b816

Please sign in to comment.