From ae5939d2aa18e9f24a36ffe55f260011f5f87716 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Mon, 5 Aug 2024 13:06:23 +0800 Subject: [PATCH] disable menu bar --- src/main/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 08175e7..217eb94 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,6 +1,6 @@ import { electronApp, optimizer, is } from '@electron-toolkit/utils' import { registerIpcMainHandlers } from './utils/ipc' -import { app, shell, BrowserWindow } from 'electron' +import { app, shell, BrowserWindow, Menu } from 'electron' import { stopCore, startCore } from './core/manager' import { triggerSysProxy } from './resolve/sysproxy' import icon from '../../resources/icon.png?asset' @@ -97,6 +97,7 @@ function handleDeepLink(url: string): void { } function createWindow(): void { + Menu.setApplicationMenu(null) // Create the browser window. window = new BrowserWindow({ minWidth: 800, @@ -112,7 +113,6 @@ function createWindow(): void { sandbox: false } }) - window.on('ready-to-show', () => { if (!getAppConfig().silentStart) { window?.show()