remove flash of white on startup

This commit is contained in:
Feross Aboukhadijeh
2016-03-02 14:01:31 -08:00
parent be7823cfa4
commit 2b9425406c

View File

@@ -54,15 +54,18 @@ app.on('before-quit', function () {
function createMainWindow () {
var win = new electron.BrowserWindow({
width: 600,
backgroundColor: '#282828',
height: 400,
show: false,
title: 'WebTorrent',
titleBarStyle: 'hidden-inset',
show: false
width: 600
})
win.loadURL('file://' + path.join(__dirname, 'main', 'index.html'))
win.webContents.on('did-finish-load', function () {
win.show()
setTimeout(function () {
win.show()
}, 30)
})
win.on('close', function (e) {
if (process.platform === 'darwin' && !isQuitting) {