Electronic BrowserWindow zoomFactor can be changed after construction? and how to choose the nearest neighbor instead of smoothing?

In the BrowserWindow electronic node constructor, you can specify webPreferences: { zoomFactor: x } to enlarge the web content of the window.

Is there a way to change this when BrowserWindow is already created?

And is there a way to indicate that the content is not smoothed when zoomed in, but zoomed in with the nearest neighbor?

+5
source share
1 answer

You can use webContents.setZoomFactor(factor)

The scaling factor is the scaling percentage divided by 100, so 300% = 3.0.

Link

+1
source

Source: https://habr.com/ru/post/1241049/


All Articles