From 895b71ef16f04246e3559ab97ae41d644642e14e Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Tue, 9 Jan 2024 14:47:28 +0100 Subject: [PATCH] adjust window size, enable dev tools in dev --- main.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index e8313da..708d26c 100644 --- a/main.js +++ b/main.js @@ -20,12 +20,11 @@ function createWindow() { // Create the browser window. mainWindow = new BrowserWindow({ - width: 800, - height: 600, + width: 600, + height: 380, resizable: false, frame: false, titleBarStyle: "hidden", - titleBarOverlay: true, webPreferences: { nodeIntegration: true, preload: path.join(__dirname, "preload.js"), @@ -55,8 +54,10 @@ function createWindow() { // loadURL(mainWindow); // Open the DevTools and also disable Electron Security Warning. - // process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = true; - // mainWindow.webContents.openDevTools(); + if (isDev()) { + process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = true; + mainWindow.webContents.openDevTools({ mode: "detach" }); + } // Emitted when the window is closed. mainWindow.on("closed", function () {