From 2d5a8e77f907a39b9220adc28205281e20347dc8 Mon Sep 17 00:00:00 2001 From: grummi92 Date: Sat, 28 Oct 2017 11:52:25 +0200 Subject: [PATCH 1/2] Linux does not support .ico files for the window icon --- electron/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electron/main.js b/electron/main.js index 61cc952b..0d077d50 100644 --- a/electron/main.js +++ b/electron/main.js @@ -138,11 +138,16 @@ function handleSquirrelEvent() { let mainWindow; let isQuitting = false; +let iconPath = __dirname + '/../resources/Icon.ico'; +if (process.platform === 'linux') { + iconPath = __dirname + '/../resources/Icon.png'; +} + function createWindow () { // Create the browser window using the state information mainWindow = new BrowserWindow({ title: 'Rambox' - ,icon: __dirname + '/../resources/Icon.ico' + ,icon: iconPath ,backgroundColor: '#FFF' ,x: config.get('x') ,y: config.get('y') From ef9d0524e05bc556ed26f66a878120857a7c7317 Mon Sep 17 00:00:00 2001 From: grummi92 Date: Sat, 16 Dec 2017 02:19:02 +0100 Subject: [PATCH 2/2] simplified window icon file type selection --- electron/main.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/electron/main.js b/electron/main.js index 0d077d50..e3e5340f 100644 --- a/electron/main.js +++ b/electron/main.js @@ -138,16 +138,11 @@ function handleSquirrelEvent() { let mainWindow; let isQuitting = false; -let iconPath = __dirname + '/../resources/Icon.ico'; -if (process.platform === 'linux') { - iconPath = __dirname + '/../resources/Icon.png'; -} - function createWindow () { // Create the browser window using the state information mainWindow = new BrowserWindow({ title: 'Rambox' - ,icon: iconPath + ,icon: __dirname + '/../resources/Icon.' + (process.platform === 'linux' ? 'png' : 'ico') ,backgroundColor: '#FFF' ,x: config.get('x') ,y: config.get('y')