Address disappearing lines in dark mode #1050
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See issue #1042 (Drawing in dark mode broke in macOS 15.2). Originally we used normal blends modes in dark mode as it looked better and was easy to see the overlaps. The bug that manifests with the normal blend mode is some lines don't draw or if they do they draw almost like narrow triangles. Given that the drawing code is just drawing lines with widths, I'm not sure how this can occur. Moreover, I'm not sure why changing the blend mode would have any effect in them appearing or not. Using multiply unfortunately changes the appearance of intersecting lines in dark mode to look less ideal. I should probably file a feedback with Apple (if I do, I should add the FB# here).
I'm not 100% sure that the drawing code is bug free, but this code has worked fine unchanged for years. If I (or anyone else) ever gets time to debug this, I'd love to better understand why changing the blend mode does anything (other than affect the blend mode).