fix: 移除桌面端原生菜单栏

This commit is contained in:
SkyJourney
2026-07-27 22:23:39 +08:00
parent 32a37293d0
commit 8d91d08809
7 changed files with 34 additions and 8 deletions
+3
View File
@@ -3,6 +3,7 @@ import {
BrowserWindow,
dialog,
ipcMain,
Menu,
net,
protocol,
session,
@@ -211,6 +212,7 @@ async function createApplication(
height: 960,
minWidth: 1024,
minHeight: 720,
autoHideMenuBar: true,
show: false,
webPreferences: {
contextIsolation: true,
@@ -357,6 +359,7 @@ async function createApplication(
app
.whenReady()
.then(async () => {
Menu.setApplicationMenu(null);
if (process.platform === "win32") {
app.setAppUserModelId("com.md-to-pdf.desktop");
}