UPD: Proper maximize handling
This commit is contained in:
@@ -25,7 +25,7 @@ const createWindow = () => {
|
||||
resizable: true,
|
||||
minWidth: width / 3,
|
||||
minHeight: height / 3,
|
||||
maximizable: false,
|
||||
maximizable: true,
|
||||
fullscreenable: false,
|
||||
center: true,
|
||||
backgroundColor: '#000',
|
||||
@@ -45,6 +45,12 @@ const createWindow = () => {
|
||||
mainWindow.on('resize', () => {
|
||||
mainWindow.webContents.setZoomFactor(zoomFactor * mainWindow.getSize()[0] / width)
|
||||
})
|
||||
mainWindow.on('maximize', () => {
|
||||
mainWindow.webContents.send('electron:maximized')
|
||||
})
|
||||
mainWindow.on('unmaximize', () => {
|
||||
mainWindow.webContents.send('electron:unmaximized')
|
||||
})
|
||||
|
||||
// and load the index.html of the app.
|
||||
if (MAIN_WINDOW_VITE_DEV_SERVER_URL) {
|
||||
|
||||
Reference in New Issue
Block a user