MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / setWindowZoom

Function setWindowZoom

apps/desktop/src/main/index.ts:790–805  ·  view source on GitHub ↗
(
  win: BrowserWindow | null | undefined,
  factor: number
)

Source from the content-addressed store, hash-verified

788}
789
790async function setWindowZoom(
791 win: BrowserWindow | null | undefined,
792 factor: number
793): Promise<number> {
794 const target = win && !win.isDestroyed() ? win : mainWindow
795 const normalized = normalizeZoomFactor(factor)
796 const windows = BrowserWindow.getAllWindows()
797 if (windows.length > 0) {
798 for (const openWin of windows) {
799 if (!openWin.isDestroyed()) applyZoomFactor(openWin, normalized)
800 }
801 } else if (target && !target.isDestroyed()) {
802 applyZoomFactor(target, normalized)
803 }
804 return await persistZoomFactor(normalized)
805}
806
807async function adjustWindowZoom(
808 win: BrowserWindow | null | undefined,

Callers 4

adjustWindowZoomFunction · 0.85
installZoomControlsFunction · 0.85
registerIpcFunction · 0.85
installAppMenuFunction · 0.85

Calls 3

normalizeZoomFactorFunction · 0.85
applyZoomFactorFunction · 0.85
persistZoomFactorFunction · 0.85

Tested by

no test coverage detected