Skip to content

Commit

Permalink
Fix missing icon on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Mar 14, 2019
1 parent 8f07fad commit a2cd040
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
File renamed without changes
17 changes: 14 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ require('electron-debug')({

function openAboutWindow() {

var aboutWindow, iconLocation;

iconLocation = "/build/icon.ico";

if (process.platform === 'linux') {
iconLocation = "/build/icon.png";
}

var aboutWindow = new BrowserWindow({
width: 400,
height: 325,
resizable: false,
fullscreenable: false,
icon: path.join(__dirname, "/build/icon.ico")
icon: path.join(__dirname, iconLocation)
});

aboutWindow.setMenu(null);
Expand All @@ -41,12 +49,15 @@ function openAboutWindow() {

app.on('ready', function () {

var menu, mainWindow, menuTemplate, windowHeight;
var menu, mainWindow, menuTemplate, windowHeight, iconLocation;

iconLocation = "/build/icon.ico";

if (process.platform === 'darwin') {
windowHeight = 756;
} else if (process.platform === 'linux') {
windowHeight = 758;
iconLocation = "/build/icon.png";
} else {
windowHeight = 780;
}
Expand All @@ -56,7 +67,7 @@ app.on('ready', function () {
height: windowHeight,
resizable: false,
fullscreenable: false,
icon: path.join(__dirname, "/build/icon.ico")
icon: path.join(__dirname, iconLocation)
});

mainWindow.on('restore', function () {
Expand Down

0 comments on commit a2cd040

Please sign in to comment.