Skip to content

Commit

Permalink
-Use the icon naming scheme Electron wants for auto selected/dark mod…
Browse files Browse the repository at this point in the history
…e icon state for Mac menu bar icon (Fixes #44)

-Update comments
  • Loading branch information
chrisknepper committed Jul 17, 2018
1 parent 77b38e9 commit c5af546
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
File renamed without changes
File renamed without changes
6 changes: 4 additions & 2 deletions src/helpers/tray/tray_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export default class TrayManager {

setTrayIconPath() {
if (IS_WINDOWS) {
// Re-use regular app .ico for the tray icon on Windows
// Re-use regular app .ico for the tray icon on Windows.
return path.join(__dirname, '..', 'resources', 'icon.ico');
} else {
const trayIconFileName = IS_MAC ? 'icon_mac.png' : 'icon.png';
// Mac tray icon filename MUST end in 'Template' and contain only black and transparent pixels.
// Otherwise, automatic inversion and dark mode appearance won't work.
const trayIconFileName = IS_MAC ? 'icon_macTemplate.png' : 'icon.png';
return path.join(__dirname, '..', 'resources', 'tray', trayIconFileName);
}
}
Expand Down

0 comments on commit c5af546

Please sign in to comment.