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

Add light theme and listen for system theme changes #61

Merged
merged 4 commits into from
May 4, 2024
Merged

Add light theme and listen for system theme changes #61

merged 4 commits into from
May 4, 2024

Conversation

mthierman
Copy link
Contributor

@mthierman mthierman commented May 3, 2024

Needs a fix before merging.

Currently some changes are not happening until relaunch (when switching system theme), not sure why. The worst one is the documentation text color.

Added an enum to map colors. There are 2 methods using setColour to adjust the theme, and the JUCE dark mode listener to set initial theme and respond to system changes for now. Colours are set using findColour.

@mthierman
Copy link
Contributor Author

Turns out JUCE caches some text colors and we need to call applyColourToAllText. Also needed to set the menuPicker colors in darkModeSettingChanged, and check for nullptr to avoid a crash if we haven't opened the picker yet. This should be good to go, although we may want to adjust some of the light mode colors as they are just an inversion of dark mode.

@baconpaul
Copy link
Owner

Looks great. I'm going to pull and tweak just a touch before merge - people are starting to use the end product this weekend.

Thank you so much for doing this!

- Update the param label typein when colors change too
- Make it so you have an always dark/always light option as well as follow
@baconpaul baconpaul merged commit cfef23b into baconpaul:main May 4, 2024
9 checks passed
@mthierman mthierman deleted the themes branch May 4, 2024 16:29
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 this pull request may close these issues.

2 participants