launch to primary monitor

This commit is contained in:
Michael Peters 2021-12-02 21:42:02 -06:00
parent 74b02bfff6
commit 84ca99a871

View File

@ -28,9 +28,18 @@ electronMain.initialize();
await LOG.ensureSourceMaps();
LOG.silly('base log source maps loaded');
const display = electron.screen.getPrimaryDisplay();
let width = 1580;//1080
let height = 720;
let x = display.workArea.x + display.workAreaSize.width / 2 - width / 2;
let y = display.workArea.y + display.workAreaSize.height / 2 - height / 2;
const window = new electron.BrowserWindow({
width: 1580,//1080,
height: 720,
width: width,
height: height,
x: x,
y: y,
minWidth: 940,
minHeight: 500,
frame: false,