From de9b686428cefe8994b012bc644bea268eb7a572 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Wed, 12 Apr 2023 00:12:56 +0800 Subject: [PATCH] re-add zoom shortcut fix --- src/main/mainWindow.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index a2a3458..e505aff 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -79,7 +79,6 @@ function initTray(win: BrowserWindow) { function initMenuBar(win: BrowserWindow) { const isWindows = process.platform === "win32"; - const isMacOS = process.platform === "darwin"; const wantCtrlQ = !isWindows || VencordSettings.store.winCtrlQ; const menu = Menu.buildFromTemplate([ @@ -132,7 +131,19 @@ function initMenuBar(win: BrowserWindow) { { role: "fileMenu" }, { role: "editMenu" }, { role: "viewMenu" }, - { role: "windowMenu" } + { role: "windowMenu" }, + { + label: "Zoom", + submenu: [ + // See https://github.com/electron/electron/issues/14742 and https://github.com/electron/electron/issues/5256 + { + label: "Zoom in", + accelerator: "CmdOrCtrl+=", + role: "zoomIn" + } + ], + visible: false + } ]); Menu.setApplicationMenu(menu);