Skip to content

Commit

Permalink
fix: tray icon appears small and blurry on Windows, Close #2077 (#2461)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesaryuan authored Jan 6, 2025
1 parent dbae887 commit b4edc42
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/main/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const getTrayIconPath = () => {
}
if (isWindows) {
// https://www.electronjs.org/docs/latest/api/tray#:~:text=Windows,best%20visual%20effects.
return path.join(__dirname, "../../resources/icon.ico")
return path.join(__dirname, "../../resources/icon-no-padding.ico")
}
return getIconPath()
}
2 changes: 1 addition & 1 deletion apps/main/src/lib/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const registerAppTray = () => {

const icon = nativeImage.createFromPath(getTrayIconPath())
// See https://stackoverflow.com/questions/41664208/electron-tray-icon-change-depending-on-dark-theme/41998326#41998326
const trayIcon = icon.resize({ width: 16 })
const trayIcon = isMacOS ? icon.resize({ width: 16 }) : icon
trayIcon.setTemplateImage(true)
tray = new Tray(trayIcon)

Expand Down
Binary file added resources/icon-no-padding.ico
Binary file not shown.

0 comments on commit b4edc42

Please sign in to comment.