* images * use expected theme on windows * fix shadowing Co-authored-by: = <=>
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 9.4 KiB |
BIN
src/assets/windows/tray_dark.ico
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/windows/tray_dark_mention.ico
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/windows/tray_dark_unread.ico
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/windows/tray_light.ico
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/windows/tray_light_mention.ico
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/windows/tray_light_unread.ico
Normal file
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 9.4 KiB |
|
@ -2,7 +2,7 @@
|
|||
// See LICENSE.txt for license information.
|
||||
|
||||
import path from 'path';
|
||||
import {app, nativeImage, Tray, systemPreferences} from 'electron';
|
||||
import {app, nativeImage, Tray, systemPreferences, nativeTheme} from 'electron';
|
||||
|
||||
import {UPDATE_TRAY} from 'common/communication';
|
||||
|
||||
|
@ -17,12 +17,14 @@ let lastStatus = 'normal';
|
|||
let lastMessage = app.name;
|
||||
|
||||
export function refreshTrayImages(trayIconTheme) {
|
||||
const winTheme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
|
||||
|
||||
switch (process.platform) {
|
||||
case 'win32':
|
||||
trayImages = {
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'windows/tray.ico')),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'windows/tray_unread.ico')),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'windows/tray_mention.ico')),
|
||||
normal: nativeImage.createFromPath(path.resolve(assetsDir, `windows/tray_${winTheme}.ico`)),
|
||||
unread: nativeImage.createFromPath(path.resolve(assetsDir, `windows/tray_${winTheme}_unread.ico`)),
|
||||
mention: nativeImage.createFromPath(path.resolve(assetsDir, `windows/tray_${winTheme}_mention.ico`)),
|
||||
};
|
||||
break;
|
||||
case 'darwin':
|
||||
|
|