From 6c6cceb3c0a3c1d4f8418cf81f828823bd19100c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 16 Jan 2018 20:52:10 -0500 Subject: [PATCH] electron screen size --- src/main.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index de00fd19..1e7253b9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,21 +11,20 @@ if (serve) { } function createWindow() { - const electronScreen = screen; - const size = electronScreen.getPrimaryDisplay().workAreaSize; + const primaryScreenSize = screen.getPrimaryDisplay().workAreaSize; // Create the browser window. win = new BrowserWindow({ x: 0, y: 0, - width: size.width, - height: size.height, + width: primaryScreenSize.width, + height: primaryScreenSize.height, }); // and load the index.html of the app. win.loadURL(url.format({ protocol: 'file:', - pathname: path.join(__dirname, '/app/index.html'), + pathname: path.join(__dirname, '/index.html'), slashes: true, }));