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:
parent
7fb8fbd450
commit
6bb3184a72
@ -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)
|
||||
|
||||
|
BIN
ElectronClient/app/build/icons/macos-16x16Template.png
Normal file
BIN
ElectronClient/app/build/icons/macos-16x16Template.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 348 B |
BIN
ElectronClient/app/build/icons/macos-16x16Template@2x.png
Normal file
BIN
ElectronClient/app/build/icons/macos-16x16Template@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 504 B |
Loading…
x
Reference in New Issue
Block a user