add icon file and update window instantiation code

This commit is contained in:
Sam Thomson 2018-12-04 20:05:22 +07:00
parent aefb5daf3d
commit a0fa0c7062
2 changed files with 3 additions and 1 deletions

BIN
app/icons/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -12,6 +12,7 @@
*/ */
import { app, BrowserWindow } from 'electron'; import { app, BrowserWindow } from 'electron';
import { autoUpdater } from 'electron-updater'; import { autoUpdater } from 'electron-updater';
import path from 'path';
import log from 'electron-log'; import log from 'electron-log';
import MenuBuilder from './menu'; import MenuBuilder from './menu';
@ -70,7 +71,8 @@ app.on('ready', async () => {
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
show: false, show: false,
width: 1024, width: 1024,
height: 728 height: 728,
icon: path.join(__dirname, 'icons/64x64.png')
}); });
mainWindow.loadURL(`file://${__dirname}/app.html`); mainWindow.loadURL(`file://${__dirname}/app.html`);