diff options
author | 2022-05-19 15:35:15 -0300 | |
---|---|---|
committer | 2022-05-19 18:35:15 +0000 | |
commit | 732ada80eda6f6d5e28e45c174f56c2b85773528 (patch) | |
tree | eb7b3d1eb23cda760fbedc39e4e76d2f68486a81 /src | |
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')
-rw-r--r-- | src/assets/images/tray/darwin-20/tray-indirect.png | bin | 0 -> 375 bytes | |||
-rw-r--r-- | src/assets/images/tray/darwin-20/tray-indirect@2x.png | bin | 0 -> 978 bytes | |||
-rw-r--r-- | src/assets/images/tray/darwin-20/tray-unread.png | bin | 0 -> 375 bytes | |||
-rw-r--r-- | src/assets/images/tray/darwin-20/tray-unread@2x.png | bin | 0 -> 957 bytes | |||
-rw-r--r-- | src/assets/images/tray/darwin-20/tray.png | bin | 0 -> 301 bytes | |||
-rw-r--r-- | src/assets/images/tray/darwin-20/tray@2x.png | bin | 0 -> 628 bytes | |||
-rw-r--r-- | src/lib/Tray.js | 10 |
7 files changed, 7 insertions, 3 deletions
diff --git a/src/assets/images/tray/darwin-20/tray-indirect.png b/src/assets/images/tray/darwin-20/tray-indirect.png new file mode 100644 index 000000000..6ee9f320a --- /dev/null +++ b/src/assets/images/tray/darwin-20/tray-indirect.png | |||
Binary files differ | |||
diff --git a/src/assets/images/tray/darwin-20/tray-indirect@2x.png b/src/assets/images/tray/darwin-20/tray-indirect@2x.png new file mode 100644 index 000000000..59edb1dbc --- /dev/null +++ b/src/assets/images/tray/darwin-20/tray-indirect@2x.png | |||
Binary files differ | |||
diff --git a/src/assets/images/tray/darwin-20/tray-unread.png b/src/assets/images/tray/darwin-20/tray-unread.png new file mode 100644 index 000000000..af536a949 --- /dev/null +++ b/src/assets/images/tray/darwin-20/tray-unread.png | |||
Binary files differ | |||
diff --git a/src/assets/images/tray/darwin-20/tray-unread@2x.png b/src/assets/images/tray/darwin-20/tray-unread@2x.png new file mode 100644 index 000000000..046d7295d --- /dev/null +++ b/src/assets/images/tray/darwin-20/tray-unread@2x.png | |||
Binary files differ | |||
diff --git a/src/assets/images/tray/darwin-20/tray.png b/src/assets/images/tray/darwin-20/tray.png new file mode 100644 index 000000000..6e05d2a56 --- /dev/null +++ b/src/assets/images/tray/darwin-20/tray.png | |||
Binary files differ | |||
diff --git a/src/assets/images/tray/darwin-20/tray@2x.png b/src/assets/images/tray/darwin-20/tray@2x.png new file mode 100644 index 000000000..a308fa35b --- /dev/null +++ b/src/assets/images/tray/darwin-20/tray@2x.png | |||
Binary files differ | |||
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 | } |