Skip to content

Commit

Permalink
use the same window size for splash and main windows
Browse files Browse the repository at this point in the history
it looks a little better this way
-
Ticket: SUITEDEV-28293
  • Loading branch information
hawser86 committed Jul 2, 2021
1 parent b1476ec commit b023639
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ const getUrl = page =>
: `file://${__dirname}/${page}`;

const createWindow = async () => {
const splashWindow = new BrowserWindow({
width: 800,
height: (1080 * 800) / 1920, // video resolution: 1920*1080
transparent: true,
frame: false
});
const width = 1024;
const height = (1080 * width) / 1920; // video resolution: 1920*1080

const splashWindow = new BrowserWindow({ width, height, useContentSize: true, backgroundColor: '#E3E9F0' });
splashWindow.loadURL(getUrl('static/splash-screen.html'));

const mainWindow = new BrowserWindow({
width: 1024,
height: 563,
width,
height,
useContentSize: true,
webPreferences: {
nodeIntegration: true
Expand Down
2 changes: 1 addition & 1 deletion static/splash-screen.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="https://redirector.eservice.emarsys.net/ui/latest/js/app.js"></script>
<link rel="stylesheet" href="https://redirector.eservice.emarsys.net/ui/latest/css/app.css" />
</head>
<body>
<body style="background-color: #E3E9F0">
<video height="100%" autoplay muted>
<source src="splash-screen-video.mp4" type="video/mp4">
</video>
Expand Down

0 comments on commit b023639

Please sign in to comment.