From 732ada80eda6f6d5e28e45c174f56c2b85773528 Mon Sep 17 00:00:00 2001 From: Fernando Figueiredo Date: Thu, 19 May 2022 15:35:15 -0300 Subject: Reworking menu bar icons for macOS 11+ (#182) * Adding template tray icons for macOS 11+ * Separate asset directory for darwin 20+ --- src/lib/Tray.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/lib/Tray.js') diff --git a/src/lib/Tray.js b/src/lib/Tray.js index 878841213..0e935d891 100644 --- a/src/lib/Tray.js +++ b/src/lib/Tray.js @@ -211,7 +211,7 @@ export default class TrayIcon { this._getAsset('tray', this._getAssetFromIndicator(this.indicator)), ); - if (isMac) { + if (isMac && !macosVersion.isGreaterThanOrEqualTo('11')) { this.trayIcon.setPressedImage( this._getAsset( 'tray', @@ -226,8 +226,12 @@ export default class TrayIcon { if ( isMac && - (nativeTheme.shouldUseDarkColors || - macosVersion.isGreaterThanOrEqualTo('11')) + macosVersion.isGreaterThanOrEqualTo('11') + ) { + platform = `${platform}-20`; + } else if ( + isMac && + nativeTheme.shouldUseDarkColors ) { platform = `${platform}-dark`; } -- cgit v1.2.3-54-g00ecf