-
Notifications
You must be signed in to change notification settings - Fork 103
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
Dark mode support for macOS & Windows #1048
Conversation
once.Do(watchTheme) | ||
} | ||
|
||
//export themeChanged |
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.
What does export
mean here?
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.
Yeah not sure if this is a Go idiom, but I meant to call out that this function is marked as extern
, so it's callable from C code, and in a sense exported to C. I can remove if it's not clear, since Go has it's own concept of exporting symbols.
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.
If it's meant for humans, make a godoc style comment with more words :)
} | ||
return monochromePng | ||
return darkOrLight(darkPng, lightPng) |
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'm okay with this, though I don't know if we want to default linux to monochrome.
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.
The monochrome icons are effectively unused with this change, on Windows/macOS if we detect dark mode we will use those icons. On Linux, or in any situation where we can't successfully detect dark mode, we default to light mode.
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'm okay with that, but I'm wondering if we should default to monochrome when we can't tell. 🤷 okay to iterate
233e487
This PR adds functionality to: