test menu

This commit is contained in:
zhandouxiaojiji committed 2020-10-10 13:16:09 +08:00
1 parent c10c6f3661
commit 87a104eff8
5 files changed
+26 -10

No files matched your search

+9 -5
View File
@@ -1,22 +1,24 @@
import { app, BrowserWindow, Menu, MenuItem, dialog, nativeTheme } from 'electron';
import {initMenu} from './src/AppMenu'
let mainWindow: BrowserWindow = null;
nativeTheme.themeSource = 'dark';
let createWindow = function () {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
width: 1280,
height: 800,
transparent: true,
webPreferences: {
// nodeIntegration: true
}
// fullscreenable:false,
// maximizable:false
});
mainWindow.webContents.openDevTools();
// mainWindow.webContents.openDevTools();
mainWindow.loadFile('index.html');
mainWindow.on('closed', function () {
mainWindow = null
})
});
}
app.on('ready', createWindow)
app.on('window-all-closed', () => {
@@ -29,4 +31,6 @@ app.on('activate', () => {
if (mainWindow === null) {
createWindow()
}
})
});
initMenu();