Skip to content

Commit

Permalink
slightly improve height calculation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hawser86 committed Jul 6, 2021
1 parent b023639 commit c854e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit c854e78

Please sign in to comment.