Merge pull request #9624 from C41M50N/feature/hide-tray

add setting to hide tray (menubar for macos)
This commit is contained in:
Eugene
2024-06-19 12:20:24 +02:00
committed by GitHub
4 changed files with 20 additions and 1 deletions

View File

@@ -183,9 +183,10 @@ export class Application {
}
enableTray (): void {
if (!!this.tray || process.platform === 'linux') {
if (!!this.tray || process.platform === 'linux' || (this.configStore.hideTray ?? false) === true) {
return
}
if (process.platform === 'darwin') {
this.tray = new Tray(`${app.getAppPath()}/assets/tray-darwinTemplate.png`)
this.tray.setPressedImage(`${app.getAppPath()}/assets/tray-darwinHighlightTemplate.png`)