choose some window config
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const { app, BrowserWindow } = require('electron/main');
|
||||
const { app, BrowserWindow, nativeTheme, Menu } = require('electron/main');
|
||||
const path = require('node:path');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
@@ -72,15 +72,17 @@ async function createWindow() {
|
||||
height: 1080,
|
||||
backgroundColor: '#000000',
|
||||
icon: 'images/icon-512.png',
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
nodeIntegration: true,
|
||||
webSecurity: false,
|
||||
disableDialogs: true
|
||||
},
|
||||
show: false,
|
||||
autoHideMenuBar: true
|
||||
});
|
||||
|
||||
nativeTheme.themeSource = 'dark';
|
||||
Menu.setApplicationMenu(null);
|
||||
|
||||
// register event callbacks
|
||||
win.on("closed", function () { win = null; });
|
||||
win.webContents.on("will-frame-navigate", (event) => validateDomain(event));
|
||||
|
||||
Reference in New Issue
Block a user