such as the question, and the increase of pixels popped up after each minimization is not the same, and there is no rule to follow. Waiting for the boss to answer
such as the question, and the increase of pixels popped up after each minimization is not the same, and there is no rule to follow. Waiting for the boss to answer
is the problem of resizadle: false. Comment out and fix the minimum and maximum width and height of the form
mainWindow = new BrowserWindow({
width: 1240,
height: 800,
minWidth: 1240,
minHeight: 800,
maxWidth: 1240,
maxHeight: 800,
center: true
// useContentSize: true
// resizable: false
//
// frame: false
})
//
// mainWindow.setResizable(false)
// mainWindow.setMaximizable(false)
in addition, whether you set resizable: false, or mainWindow.setResizable (false), in the main thread or in the rendering process
import { remote } from 'electron'
remote.getCurrentWindow().setResizable(false)
The above problems occur in all .
and, if you keep the window maximize button, useContentSize: true, it's best to remove this, otherwise the form will change slightly when you click maximize.
I have the same problem, but my window height is getting smaller and smaller. This happens only when the Windows system is running and the main process sets the option that the window is not allowed to be resized.
mainWindow = new BrowserWindow ({
width: 340,
height: 550,
useContentSize: true,
resizable: false, //
fullscreen: false,
fullscreenable: false,
webPreferences: {
// devTools: false //
}
})