( win: BrowserWindow | null | undefined, delta: number )
| 805 | } |
| 806 | |
| 807 | async function adjustWindowZoom( |
| 808 | win: BrowserWindow | null | undefined, |
| 809 | delta: number |
| 810 | ): Promise<number> { |
| 811 | const target = win && !win.isDestroyed() ? win : mainWindow |
| 812 | const base = target && !target.isDestroyed() ? target.webContents.getZoomFactor() : currentZoomFactor |
| 813 | return await setWindowZoom(target, base + delta) |
| 814 | } |
| 815 | |
| 816 | function isZoomShortcut(input: Electron.Input, key: string, code: string): boolean { |
| 817 | return input.key === key || input.code === code |
no test coverage detected