Use a PNG for the icon on non-Windows

MATE desktop env (and presumably other GNOMEs don't support ICOs,
so use a PNG.

Fixes https://github.com/vector-im/riot-web/issues/2705
pull/2708/head
David Baker 2016-12-07 11:19:51 +00:00
parent f6957aa367
commit 737f912abb
1 changed files with 5 additions and 1 deletions

View File

@ -156,8 +156,12 @@ electron.app.on('ready', () => {
console.log("No update_base_url is defined: auto update is disabled"); console.log("No update_base_url is defined: auto update is disabled");
} }
const icon_path = `${__dirname}/../img/riot.` + (
process.platform == 'win32' ? 'ico' : 'png'
);
mainWindow = new electron.BrowserWindow({ mainWindow = new electron.BrowserWindow({
icon: `${__dirname}/../img/riot.ico`, icon: icon_path,
width: 1024, height: 768, width: 1024, height: 768,
show: false, show: false,
}); });