Skip to content

Commit

Permalink
Electron: Fixes #86: App icon missing on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Dec 10, 2017
1 parent b9194e9 commit 931083b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ElectronClient/app/ElectronAppWrapper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { _ } = require('lib/locale.js');
const { BrowserWindow } = require('electron');
const { shim } = require('lib/shim');
const url = require('url')
const path = require('path')
const urlUtils = require('lib/urlUtils.js');
Expand Down Expand Up @@ -38,12 +39,18 @@ class ElectronAppWrapper {
defaultHeight: 600,
});

this.win_ = new BrowserWindow({
const windowOptions = {
'x': windowState.x,
'y': windowState.y,
'width': windowState.width,
'height': windowState.height
})
'height': windowState.height,
};

// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098
// Fix: https://github.com/electron-userland/electron-builder/issues/2269
if (shim.isLinux()) windowOptions.icon = __dirname + '/build/icons/128x128.png';

this.win_ = new BrowserWindow(windowOptions)

this.win_.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
Expand Down

0 comments on commit 931083b

Please sign in to comment.