Skip to content

Commit

Permalink
Add tray_icon_path to config to allow overriding tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
3nprob committed Aug 3, 2022
1 parent f00f33d commit f237216
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion element.io/nightly/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
"feature_spotlight": true,
"feature_video_rooms": true
},
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx",
"tray_icon_path": null
}
3 changes: 2 additions & 1 deletion element.io/release/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
"apiHost": "https://posthog.element.io"
},
"privacy_policy_url": "https://element.io/cookie-policy",
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx",
"tray_icon_path": null
}
4 changes: 2 additions & 2 deletions src/electron-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ async function setupGlobals(): Promise<void> {

// The tray icon
// It's important to call `path.join` so we don't end up with the packaged asar in the final path.
const iconFile = `element.${process.platform === 'win32' ? 'ico' : 'png'}`;
iconPath = path.join(resPath, "img", iconFile);
const iconPath = vectorConfig.tray_icon_path ||
path.join(resPath, "img", `element.${process.platform === 'win32' ? 'ico' : 'png'}`);
trayConfig = {
icon_path: iconPath,
brand: vectorConfig.brand || 'Element',
Expand Down

0 comments on commit f237216

Please sign in to comment.