1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-13 19:42:36 +02:00

macOS: Resolves #243: Added black and white tray icon for macOS

This commit is contained in:
Laurent Cozic 2018-02-20 00:41:52 +00:00
parent 7fb8fbd450
commit 6bb3184a72
3 changed files with 15 additions and 2 deletions

View File

@ -129,11 +129,24 @@ class ElectronAppWrapper {
return dir;
}
trayIconFilename_() {
let output = '';
if (process.platform === 'darwin') {
output = 'macos-16x16Template.png'; // Electron Template Image format
} else {
output = '16x16.png';
}
//if (this.env_ === 'dev') output = '16x16-dev.png'
return output;
}
// Note: this must be called only after the "ready" event of the app has been dispatched
createTray(contextMenu) {
try {
const iconFilename = this.env_ === 'dev' ? '16x16-dev.png' : '16x16.png';
this.tray_ = new Tray(this.buildDir() + '/icons/' + iconFilename)
this.tray_ = new Tray(this.buildDir() + '/icons/' + this.trayIconFilename_())
this.tray_.setToolTip(this.electronApp_.getName())
this.tray_.setContextMenu(contextMenu)

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B