Tray Icon : Changed Unread tray icon in Windows.

Replaced unread messages icon in the lower tray bar in windows with a new icon.
Fixed #506.
This commit is contained in:
Aryan Shridhar
2020-09-17 16:07:23 +05:30
committed by GitHub
parent 23e86abb5b
commit 126bb26a6e
2 changed files with 6 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ const iconPath = (): string => {
return APP_ICON + (process.platform === 'win32' ? 'win.ico' : 'macOSTemplate.png');
};
const winUnreadTrayIconPath = (): string => APP_ICON + 'unread.ico';
let unread = 0;
const trayIconSize = (): number => {
@@ -97,6 +99,10 @@ const renderCanvas = function (arg: number): HTMLCanvasElement {
* @return the native image
*/
const renderNativeImage = function (arg: number): NativeImage {
if (process.platform === 'win32') {
return nativeImage.createFromPath(winUnreadTrayIconPath());
}
const canvas = renderCanvas(arg);
const pngData = nativeImage.createFromDataURL(canvas.toDataURL('image/png')).toPNG();
return nativeImage.createFromBuffer(pngData, {

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB