From 3fc175732425aa054ea753ffb792e2f8a0ee7b5a Mon Sep 17 00:00:00 2001 From: Cady Date: Sun, 28 Apr 2024 12:52:44 +0200 Subject: [PATCH] Add a submenu item (and thus hotkey) to reset the zoom level (#569) expose the `resetZoom` role (https://www.electronjs.org/docs/latest/api/menu-item) --- src/menu.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/menu.ts b/src/menu.ts index 22f22a3..1fd1654 100644 --- a/src/menu.ts +++ b/src/menu.ts @@ -104,7 +104,9 @@ export async function setMenu(): Promise { // Fix for zoom in on keyboards with dedicated + like QWERTZ (or numpad) // 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}, - {label: "Zoom out", accelerator: "CmdOrCtrl+-", role: "zoomOut"} + {label: "Zoom out", accelerator: "CmdOrCtrl+-", role: "zoomOut"}, + {type: "separator"}, + {label: "Reset zoom", accelerator: "CmdOrCtrl+0", role: "resetZoom"} ] } ];