mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-03 13:33:18 +00:00
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:
@@ -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, {
|
||||
|
||||
BIN
app/resources/tray/trayunread.ico
Normal file
BIN
app/resources/tray/trayunread.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 91 KiB |
Reference in New Issue
Block a user