From 2b9425406c772a3e3d74730da68d29ad1e7a4d34 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 2 Mar 2016 14:01:31 -0800 Subject: [PATCH] remove flash of white on startup --- index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d8462664..67489905 100644 --- a/index.js +++ b/index.js @@ -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) {