From c2f9c17189d8ce48428904f978a07add484f5f4d Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Thu, 1 Oct 2020 22:01:09 -0400 Subject: [PATCH] refactoring --- main-electron.js | 52 +++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/main-electron.js b/main-electron.js index 9a1c9bb2..6fc423ed 100644 --- a/main-electron.js +++ b/main-electron.js @@ -7,37 +7,27 @@ let win; function createWindow() { // Create the browser window. - if(process.platform === "win32"){ - win = new BrowserWindow({ - width: 377, - height: 800, - title: "Sengi", - icon: join(__dirname, '/assets/icons/win/icon.ico'), - backgroundColor: "#131925", - useContentSize: true, - webPreferences: { - spellcheck: false - } - // webPreferences: { - // contextIsolation: true, - // nodeIntegration: false, - // nodeIntegrationInWorker: false - // } - }); - } else { - win = new BrowserWindow({ - width: 377, - height: 800, - title: "Sengi", - //icon: join(__dirname, '/src/assets/icons/icon-512x512.png'), - icon: join(__dirname, '/assets/icons/png/512x512.png'), - backgroundColor: "#131925", - useContentSize: true, - webPreferences: { - spellcheck: false - } - }); - } + let icon = join(__dirname, '/assets/icons/png/512x512.png'); + if (process.platform === "win32") { + icon = join(__dirname, '/assets/icons/win/icon.ico'); + } + + win = new BrowserWindow({ + width: 377, + height: 800, + title: "Sengi", + icon: icon, + backgroundColor: "#131925", + useContentSize: true, + webPreferences: { + spellcheck: false + } + // webPreferences: { + // contextIsolation: true, + // nodeIntegration: false, + // nodeIntegrationInWorker: false + // } + }); win.setAutoHideMenuBar(true); win.setMenuBarVisibility(false);