hide menu bar on linux

This commit is contained in:
DJ2LS 2021-08-28 15:50:59 +02:00 committed by GitHub
parent 83b3f773c6
commit a3f7557226
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,8 @@ function createWindow() {
win = new BrowserWindow({
width: 1220,
height: 920,
autoHideMenuBar: true,
icon: __dirname + '/src/app-icon.png',
webPreferences: {
//preload: path.join(__dirname, 'preload-main.js'),
preload: require.resolve('./preload-main.js'),
@ -17,6 +19,9 @@ function createWindow() {
enableRemoteModule: false, //https://stackoverflow.com/questions/53390798/opening-new-window-electron/53393655 https://github.com/electron/remote
}
})
// hide menu bar
win.setMenuBarVisibility(false)
//open dev tools
win.webContents.openDevTools({
mode: 'undocked',