From 4ef01959ffcc7eea34635e64a1a198128aea4e8f Mon Sep 17 00:00:00 2001 From: xianfei Date: Mon, 23 Oct 2023 14:34:40 -0400 Subject: [PATCH] Update main.js --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 1ae81a6..c3c35cb 100644 --- a/main.js +++ b/main.js @@ -307,6 +307,8 @@ function createModelViewerWindow(args) { titleBarStyle: platform === "darwin" ? "hiddenInset" : "hidden", autoHideMenuBar: true, show: false, + width: 820, + height: 540, ...addtionalArgs, titleBarOverlay: { color: args.backgroundColor, @@ -332,7 +334,7 @@ function createModelViewerWindow(args) { viewer.webContents.once('dom-ready', () => { viewer.show(); viewer.loadFile("modelview/modelview.html"); - viewer.setSize(820*screen.getPrimaryDisplay().scaleFactor,540*screen.getPrimaryDisplay().scaleFactor) + if (args.useGlass) viewer.setSize(820*screen.getPrimaryDisplay().scaleFactor,540*screen.getPrimaryDisplay().scaleFactor) }); // Open the DevTools.