(win: BrowserWindow | null | undefined)
| 3 | import { isLinux } from '../config' |
| 4 | |
| 5 | export const zoomIn = (win: BrowserWindow | null | undefined): void => { |
| 6 | if (!win) return |
| 7 | const { webContents } = win |
| 8 | const zoom = webContents.getZoomFactor() |
| 9 | // WORKAROUND: We need to set zoom on the browser window due to Electron#16018. |
| 10 | webContents.send('mt::window-zoom', Math.min(2.0, zoom + 0.125)) |
| 11 | } |
| 12 | |
| 13 | export const zoomOut = (win: BrowserWindow | null | undefined): void => { |
| 14 | if (!win) return |
no test coverage detected