adjust window size, enable dev tools in dev
This commit is contained in:
		
							
								
								
									
										11
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								main.js
									
									
									
									
									
								
							| @@ -20,12 +20,11 @@ function createWindow() { | |||||||
|  |  | ||||||
|   // Create the browser window. |   // Create the browser window. | ||||||
|   mainWindow = new BrowserWindow({ |   mainWindow = new BrowserWindow({ | ||||||
|     width: 800, |     width: 600, | ||||||
|     height: 600, |     height: 380, | ||||||
|     resizable: false, |     resizable: false, | ||||||
|     frame: false, |     frame: false, | ||||||
|     titleBarStyle: "hidden", |     titleBarStyle: "hidden", | ||||||
|     titleBarOverlay: true, |  | ||||||
|     webPreferences: { |     webPreferences: { | ||||||
|       nodeIntegration: true, |       nodeIntegration: true, | ||||||
|       preload: path.join(__dirname, "preload.js"), |       preload: path.join(__dirname, "preload.js"), | ||||||
| @@ -55,8 +54,10 @@ function createWindow() { | |||||||
|   // loadURL(mainWindow); |   // loadURL(mainWindow); | ||||||
|  |  | ||||||
|   // Open the DevTools and also disable Electron Security Warning. |   // Open the DevTools and also disable Electron Security Warning. | ||||||
|   // process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = true; |   if (isDev()) { | ||||||
|   // mainWindow.webContents.openDevTools(); |     process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = true; | ||||||
|  |     mainWindow.webContents.openDevTools({ mode: "detach" }); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   // Emitted when the window is closed. |   // Emitted when the window is closed. | ||||||
|   mainWindow.on("closed", function () { |   mainWindow.on("closed", function () { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user