If the Windows display zoom is set to 150%, the Electron app also appears zoomed. I want my app to avoid the windows zoom level and always display in 100% zoom only.
I have tried the zoomFactor:1
but it's not working.
When creating your BrowserWindow just set the maximizable property of the options object to true . Since you didn't show us any code, this is just an example: const { BrowserWindow } = require ("electron"); var window = new BrowserWindow ({ title: "My App", maximizable: false });
Electron apps can be developed even quicker than many other frameworks allow because they are written in JavaScript. Not only is JavaScript a language that most developers are very familiar with, but JavaScript is also far easier to debug and optimize than most other languages used to develop apps.
As per @hijleh suggestion, adding the following lines in the main process has resolved the issue. The app is now avoiding the Windows display zoom.
app.commandLine.appendSwitch('high-dpi-support', 1)
app.commandLine.appendSwitch('force-device-scale-factor', 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With