diff options
author | 2022-01-09 14:20:21 +0100 | |
---|---|---|
committer | 2022-01-09 14:20:21 +0100 | |
commit | e0ac9d0daaf9ab781f3660948cc944e10d4c3df6 (patch) | |
tree | f765a092bf9921bea7f195438401975c7c7f7b66 /src/lib/Tray.js | |
parent | 5.6.10-nightly.0 [skip ci] (diff) | |
download | ferdium-app-e0ac9d0daaf9ab781f3660948cc944e10d4c3df6.tar.gz ferdium-app-e0ac9d0daaf9ab781f3660948cc944e10d4c3df6.tar.zst ferdium-app-e0ac9d0daaf9ab781f3660948cc944e10d4c3df6.zip |
#1140 Fix tray icon color on latest macOS
Diffstat (limited to 'src/lib/Tray.js')
-rw-r--r-- | src/lib/Tray.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Tray.js b/src/lib/Tray.js index 63382483e..549034e8d 100644 --- a/src/lib/Tray.js +++ b/src/lib/Tray.js | |||
@@ -232,7 +232,7 @@ export default class TrayIcon { | |||
232 | platform = `${platform}-dark`; | 232 | platform = `${platform}-dark`; |
233 | } | 233 | } |
234 | 234 | ||
235 | return nativeImage.createFromPath( | 235 | const trayImg = nativeImage.createFromPath( |
236 | join( | 236 | join( |
237 | __dirname, | 237 | __dirname, |
238 | '..', | 238 | '..', |
@@ -243,5 +243,11 @@ export default class TrayIcon { | |||
243 | `${asset}.${FILE_EXTENSION}`, | 243 | `${asset}.${FILE_EXTENSION}`, |
244 | ), | 244 | ), |
245 | ); | 245 | ); |
246 | |||
247 | if (isMac && macosVersion.isGreaterThanOrEqualTo('11')) { | ||
248 | trayImg.setTemplateImage(true); | ||
249 | } | ||
250 | |||
251 | return trayImg; | ||
246 | } | 252 | } |
247 | } | 253 | } |