Override height and width of every new window created

This commit is contained in:
Agampreet Singh
2024-05-08 00:46:02 +05:30
parent 102126d6d3
commit af448cac3d

View File

@@ -155,7 +155,7 @@ app.on("web-contents-created", (event, contents) => {
`On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"` `On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`
); );
} }
return { action: "allow" }; return { action: "allow", overrideBrowserWindowOptions: { width: 1081, height: 610 } };
} }
}); });
contents.on("did-finish-load", () => { contents.on("did-finish-load", () => {