Skip to content

ElectronBrowserWindow.setAspectRatio method

ElectronBrowserWindow › setAspectRatio

Unofficial

Makes the window maintain an aspect ratio.

Signature:

setAspectRatio(aspectRatio: number, extraSize?: ElectronSize | undefined): void

Parameters:

Parameter Type Description
aspectRatio number The aspect ratio to maintain.
extraSize? ElectronSize | undefined Extra size not included within the aspect ratio calculations.

Returns: void