diff options
author | Fernando Figueiredo <fernando.fig@gmail.com> | 2022-05-19 15:35:15 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 18:35:15 +0000 |
commit | 732ada80eda6f6d5e28e45c174f56c2b85773528 (patch) | |
tree | eb7b3d1eb23cda760fbedc39e4e76d2f68486a81 /src/lib/Tray.js | |
parent | 6.0.0-nightly.41 [skip ci] (diff) | |
download | ferdium-app-732ada80eda6f6d5e28e45c174f56c2b85773528.tar.gz ferdium-app-732ada80eda6f6d5e28e45c174f56c2b85773528.tar.zst ferdium-app-732ada80eda6f6d5e28e45c174f56c2b85773528.zip |
Reworking menu bar icons for macOS 11+ (#182)
* Adding template tray icons for macOS 11+
* Separate asset directory for darwin 20+
Diffstat (limited to 'src/lib/Tray.js')
-rw-r--r-- | src/lib/Tray.js | 10 |
1 files changed, 7 insertions, 3 deletions
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 { | |||
211 | this._getAsset('tray', this._getAssetFromIndicator(this.indicator)), | 211 | this._getAsset('tray', this._getAssetFromIndicator(this.indicator)), |
212 | ); | 212 | ); |
213 | 213 | ||
214 | if (isMac) { | 214 | if (isMac && !macosVersion.isGreaterThanOrEqualTo('11')) { |
215 | this.trayIcon.setPressedImage( | 215 | this.trayIcon.setPressedImage( |
216 | this._getAsset( | 216 | this._getAsset( |
217 | 'tray', | 217 | 'tray', |
@@ -226,8 +226,12 @@ export default class TrayIcon { | |||
226 | 226 | ||
227 | if ( | 227 | if ( |
228 | isMac && | 228 | isMac && |
229 | (nativeTheme.shouldUseDarkColors || | 229 | macosVersion.isGreaterThanOrEqualTo('11') |
230 | macosVersion.isGreaterThanOrEqualTo('11')) | 230 | ) { |
231 | platform = `${platform}-20`; | ||
232 | } else if ( | ||
233 | isMac && | ||
234 | nativeTheme.shouldUseDarkColors | ||
231 | ) { | 235 | ) { |
232 | platform = `${platform}-dark`; | 236 | platform = `${platform}-dark`; |
233 | } | 237 | } |