Update window size automaticatlly

This commit is contained in:
Atlante45 2016-10-12 15:16:41 -07:00
parent 08f3a85aab
commit 4bea6f2931
3 changed files with 12 additions and 4 deletions

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="content-update.css"></link>
</head>
<body onload="ready()">
<div class="colmask">
<div class="colmask" id="content">
<h3>We backed up your old Sandbox content, just in case.</h3>
<p><b>To restore it, follow these steps:</b>
@ -45,9 +45,9 @@
</div>
<div class="footer">
<p>For more information about managing your high Fidelity Sandbox Server, check out our docs: <a href="https://wiki.highfidelity.com/wiki/Sandbox" target="_blank">wiki.highfidelity.com/wiki/Sandbox</a>
<p>For more information about managing your high Fidelity Sandbox Server, check out our docs: <a href="https://wiki.highfidelity.com/wiki/Sandbox" target="_blank">wiki.highfidelity.com/wiki/Sandbox</a>
</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -6,6 +6,11 @@ function ready() {
electron.ipcRenderer.on('update', function(event, message) {
$('#directory').html(message);
electron.ipcRenderer.send('setSize', {
width: $(window).width(),
height: $('#content').height() + 50
});
});
electron.ipcRenderer.send('ready');

View file

@ -530,6 +530,9 @@ function openBackupInstructions(folder) {
}
window.show();
electron.ipcMain.on('setSize', function(event, obj) {
window.setSize(obj.width, obj.height);
});
electron.ipcMain.on('ready', function() {
console.log("got ready");
window.webContents.send('update', folder);