Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release notes dialog content displaying as white text on white background in dark mode #2541

Closed
tomasstrba opened this issue Apr 16, 2024 · 3 comments · Fixed by #2542
Closed

Comments

@tomasstrba
Copy link

Summary

The update dialog appeared while macOS was in dark mode and the release notes were not visible. Switching dark mode off fixed the issue.

This issue only appears when the automatic switching of appearance modes on macOS is enabled, and the update window is already open when the system auto-transitions from light to dark.

Screenshot 2024-04-16 at 11 27 00 AM

Version

2.6.0

@zorgiepoo
Copy link
Member

zorgiepoo commented Apr 16, 2024

I can reproduce with the Sparkle Test App. Interesting the issue does not reproduce for me going from dark -> light, only from light -> dark, and not with the legacy webkit view. Possibly we are observing the wrong view for appearance change or something along those lines.

@zorgiepoo
Copy link
Member

zorgiepoo commented Apr 18, 2024

With the Sparkle Test App, I think the issue is with -adaptReleaseNotesAppearance. With some quick tests I did with one of my apps, on macOS 10.15, macOS 12, and macOS 14 I don't think this method is needed at all and can be skipped. However my app that I used doesn't suffer this problem (maybe timing or view-ordering related or such).

On 10.14, it seems like we still need to call setDrawsBackground: part of adaptReleaseNotesAppearance on the WebKit view otherwise the rendering won't be correct (similar to this issue). I am not sure why the other part of the adaptReleaseNotesAppearance method is needed at all (setting up the _darkBackgroundView NSBox).

I also have not tested the legacy WebKit1 view implementation, which I still need to do as it's a fallback for some sandboxed apps.

@tomasstrba if you test your app on multiple OS configurations it may be helpful to know which OS versions this issue occurs on.

Basically some of this code is not needed and may be causing this issue on later OS versions, but some of this may be needed on older OS versions.. and still need to test the legacy view.

edit: ahh, I've accidentally been testing the legacy webkit view.. so I'll need to test the modern one.

@zorgiepoo
Copy link
Member

zorgiepoo commented Apr 19, 2024

I take back what I said back. I think we still need to call setDrawsBackground: (otherwise I've seen white flashes in dark mode) but the order of events matters here with regards to when the appearance of the web view changes and when drawing the background is disabled. Still need to investigate more.

Also it seems like the _darkBackgroundView is needed for an even darker background, so I won't change that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants