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)
This commit is contained in:
Cady 2024-04-28 12:52:44 +02:00 committed by GitHub
parent 45c315a113
commit 3fc1757324
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -104,7 +104,9 @@ export async function setMenu(): Promise<void> {
// 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"}
]
}
];