Skip to content

Commit

Permalink
improve ready to show logic and window size
Browse files Browse the repository at this point in the history
  • Loading branch information
Galkon committed Nov 13, 2023
1 parent 29e027e commit d89b40f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ function pollServer(url) {
*/
const createWindow = async () => {
const win = new BrowserWindow({
show: false,
width: 700,
height: 400,
height: 420,
minWidth: 700,
minHeight: 400,
minHeight: 420,
backgroundColor: '#000',
webPreferences: {
contextIsolation: true,
Expand All @@ -49,6 +50,10 @@ const createWindow = async () => {
await pollServer(startUrl); // Wait for server to be ready
}

win.removeMenu()
win.once('ready-to-show', () => {
win.show()
})
await win.loadURL(startUrl)
return win
}
Expand Down
1 change: 0 additions & 1 deletion src/renderer/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Trainer from './components/Trainer'
const Body = styled.div`
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100%;
height: 100%;
Expand Down

0 comments on commit d89b40f

Please sign in to comment.