rebuild menu

This commit is contained in:
zhandouxiaojiji committed 2020-10-14 20:25:31 +08:00
1 parent a1adbe69c5
commit 677815572c
3 files changed
+93 -22

No files matched your search

+7 -1
View File
@@ -25,6 +25,7 @@ export class MainProcess {
createWindow (){
this.settings = new Settings();
this.appMenu = new AppMenu(this);
this.mainWindow = new BrowserWindow({
width: 1280,
height: 800,
@@ -39,7 +40,12 @@ export class MainProcess {
this.mainWindow.on('closed', function () {
this.mainWindow = null
});
this.appMenu = new AppMenu(this);
this.rebuildMenu();
}
rebuildMenu() {
console.log("rebuild menu");
Menu.setApplicationMenu(this.appMenu.createMenu());
}
}