From 1ace947d1e9155502e2661caae1f75e5ca157cec Mon Sep 17 00:00:00 2001 From: SG Prakash <55944766+sgprakas@users.noreply.github.com> Date: Wed, 29 May 2024 09:18:28 +0530 Subject: [PATCH] added hide/show MenuBar feature (#660) **Description:** I recently installed waveterm and I just love it. I like to use my terminal without titlebar, So I removed the titlebar of waveterm in my ubuntu desktop but the menu bar is showing constantly. So I look into the code and made the changes. This pull request adds a simple feature which will hide/show the menubar using `ALT` key. **Changes Made:** 1. When initializing electron's BrowserWindow, I added a parameter `autoHideMenuBar: true`. **Testing Done:** Tested the feature by pressing `ALT` Key. It works perfectly. --- src/electron/emain.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/electron/emain.ts b/src/electron/emain.ts index 5d22e178..cd490297 100644 --- a/src/electron/emain.ts +++ b/src/electron/emain.ts @@ -341,6 +341,7 @@ function createWindow(clientData: ClientDataType | null): Electron.BrowserWindow preload: path.join(getElectronAppBasePath(), DistDir, "preload.js"), }, show: false, + autoHideMenuBar: true, }); win.once("ready-to-show", () => { win.show();