remove flash of white on startup
This commit is contained in:
9
index.js
9
index.js
@@ -54,15 +54,18 @@ app.on('before-quit', function () {
|
|||||||
|
|
||||||
function createMainWindow () {
|
function createMainWindow () {
|
||||||
var win = new electron.BrowserWindow({
|
var win = new electron.BrowserWindow({
|
||||||
width: 600,
|
backgroundColor: '#282828',
|
||||||
height: 400,
|
height: 400,
|
||||||
|
show: false,
|
||||||
title: 'WebTorrent',
|
title: 'WebTorrent',
|
||||||
titleBarStyle: 'hidden-inset',
|
titleBarStyle: 'hidden-inset',
|
||||||
show: false
|
width: 600
|
||||||
})
|
})
|
||||||
win.loadURL('file://' + path.join(__dirname, 'main', 'index.html'))
|
win.loadURL('file://' + path.join(__dirname, 'main', 'index.html'))
|
||||||
win.webContents.on('did-finish-load', function () {
|
win.webContents.on('did-finish-load', function () {
|
||||||
win.show()
|
setTimeout(function () {
|
||||||
|
win.show()
|
||||||
|
}, 30)
|
||||||
})
|
})
|
||||||
win.on('close', function (e) {
|
win.on('close', function (e) {
|
||||||
if (process.platform === 'darwin' && !isQuitting) {
|
if (process.platform === 'darwin' && !isQuitting) {
|
||||||
|
|||||||
Reference in New Issue
Block a user