[GH-317] Correct size for Linux tray icons (#1595)

Signed-off-by: Elsie Hupp <9206310+elsiehupp@users.noreply.github.com>
This commit is contained in:
Elsie Hupp
2021-06-07 11:11:20 -04:00
committed by GitHub
parent 9eb61c6cc0
commit 6b17f30d35
26 changed files with 11 additions and 9 deletions

View File

@@ -44,19 +44,18 @@ export function refreshTrayImages(trayIconTheme) {
}
case 'linux':
{
const theme = trayIconTheme;
try {
if (trayIconTheme.equals('dark')) {
trayImages = {
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIcon.png')),
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconUnread.png')),
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconMention.png')),
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'top_bar_dark_16.png')),
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'top_bar_dark_unread_16.png')),
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'top_bar_dark_mention_16.png')),
};
} catch (e) {
} else {
//Fallback for invalid theme setting
trayImages = {
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIcon.png')),
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconUnread.png')),
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconMention.png')),
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'top_bar_light_16.png')),
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'top_bar_light_unread_16.png')),
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'top_bar_light_mention_16.png')),
};
}
break;