-
-
Notifications
You must be signed in to change notification settings - Fork 25
Conversation
app/main.js
Outdated
@@ -70,15 +70,21 @@ app.on('ready', function() { | |||
|
|||
// Create the browser window. | |||
mainWindow = new BrowserWindow({ | |||
backgroundColor: '#ffffff', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the documentation, this is the default. Is this really needed?
And why is it here? Mind explaining the rest of the solution a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there might be a bug with electron in high sierra as reported here electron/electron#10559 so the default colour turn grey and throw this error
Electron[10948:1810625] *** WARNING: Textured window <AtomNSWindow: 0x7ff440c1af60> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
I solve it by setting the colour to white, might not be the best solution but at least it looks better? oh wait maybe i can look into the -titlebarAppearsTransparent=YES
as shown in the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait maybe i can look into the
-titlebarAppearsTransparent=YES
as shown in the error.
Please do, as the ready-to-show
workaround is something I’d prefer to avoid.
Thank you for the explanation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at the moment can't really be fixed? Only solution is the fallback I made? Seems to be a known issue with electron and high Sierra :( electron/electron#10521
btw there's this blue line on top, looks like a webkit highlight is that normal? tried to get rid of it but couldn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw there's this blue line on top, looks like a webkit highlight is that normal?
It’s caused by focusing the webview, so we can use the keyboard shortcuts.
app/main.js
Outdated
|
||
mainWindow.once('ready-to-show', () => { | ||
mainWindow.show() | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the solution of backgroundColor: '#ffffff'
at L73 the app started with grey then turn white. So I solved it by following this tutorial by adding
show: false
at mainWindow
then
mainWindow.once('ready-to-show', () => {
mainWindow.show()
})
at L81-87
Thank you for the PR and the discussion. I ended up following a slightly different route. Instead of still showing the app unloaded with a white background (not much better than having the grey background flash to white), instead don’t show the app at all until content has loaded. |
Fix for #4