Skip to content

Commit

Permalink
[FIX] The icon image was not displayed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ykhwong committed Oct 19, 2019
1 parent c7ea19e commit 0f63dfc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion backend.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { app, Menu, Tray } = require('electron');
const frontendDir = __dirname + '/frontend/';
const iconFile = __dirname + '/icon.png';
let iconFile;
let tray = null;
app.disableHardwareAcceleration();

Expand Down Expand Up @@ -96,6 +96,13 @@ app.on('ready', function() {
let configPath;
const configFile = 'config.js';
const fs = require("fs-extra");

if (process.platform === 'win32') {
iconFile = __dirname + '/icon.ico';
} else {
iconFile = __dirname + '/icon.png';
}

mainWindow3 = createWin(winData.config.width, winData.config.height, false, winData.config.dest, false);
mainWindow3.on('close', function (event) {
event.preventDefault();
Expand Down
Binary file added icon.ico
Binary file not shown.
Binary file modified icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0f63dfc

Please sign in to comment.