MCPcopy Index your code
hub / github.com/marktext/marktext / zoomIn

Function zoomIn

packages/desktop/src/main/windows/utils.ts:5–11  ·  view source on GitHub ↗
(win: BrowserWindow | null | undefined)

Source from the content-addressed store, hash-verified

3import { isLinux } from '../config'
4
5export 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
13export const zoomOut = (win: BrowserWindow | null | undefined): void => {
14 if (!win) return

Callers 2

createWindowMethod · 0.90
clickFunction · 0.90

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected