The app logo is properly shown everywhere else but in the notification section where it displays an empty logo
I know that you can add a custom image for the notification passing a icon
property like so:
new Notification({
title: 'Test Notification',
body: 'This is a test notification',
icon: path.join(__dirname, 'icon.ico'),
});
But that's not the logo I want to change.
The app when built also shows the correct logo elsewhere:
I also added an icon
property when creating the BrowserWindow
like advised here.
const win = splashWindow = new BrowserWindow({
width: 320,
height: 320,
// more
icon: path.resolve(__dirname, 'icon.ico'),
});
Adding a
win.setIcon(path.resolve(__dirname, 'icon.ico');
doesn't work too.
This code is all in main.js
.
And I've been checking the docs for the App
class and there's a getFileIcon
but it doesn't appear to be related to this.
May be related?
I have been able to modify the app name to 'Awesome App' via setAppUserModelId
like so:
ipcMain.on('app-ready', () => {
if (process.platform === 'win32') {
// somehow also change logo here? can't find it in the docs
app.setAppUserModelId('Awesome app');
}