From c854e780ec10fd6bc217d69b94f22d7af63a41e9 Mon Sep 17 00:00:00 2001 From: rgargya Date: Tue, 6 Jul 2021 10:36:11 +0200 Subject: [PATCH] slightly improve height calculation Width and height must be integers, and if any of them is a float, the default value is used silently (without warning). Using the 1024px width accidentally results the height to be an integer, but when I changed to some other value, it did not work, and I did not understand why. - Ticket: SUITEDEV-28293 --- src/main/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index bfc6953..e9db4ef 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -19,7 +19,7 @@ const getUrl = page => const createWindow = async () => { const width = 1024; - const height = (1080 * width) / 1920; // video resolution: 1920*1080 + const height = Math.floor(1080 * width) / 1920; // video resolution: 1920*1080 const splashWindow = new BrowserWindow({ width, height, useContentSize: true, backgroundColor: '#E3E9F0' }); splashWindow.loadURL(getUrl('static/splash-screen.html'));