-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Store Themes as JSON files #4471
Conversation
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.
clang-tidy made some suggestions
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.
Dark theme differences
old | new |
---|---|
This has to do with some ancient ifdefs https://github.com/Chatterino/chatterino2/blame/8064f8a49ebf72e9332c0208e3b5b9d54bf3ec4c/lib/appbase/BaseTheme.cpp#L65-L69
I'm ok to concede the window background color so it's the same on Windows & MacOS, but changed on Linux (for now).
LGTM 👍
Thank you
I'm also not super fond of the macro solution but I understand there would be some string duplication without it, so I'm fine to leave that to some potential cleanup PR in the future. |
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
This PR removes the manual theme creation and adds theme parsing from JSON (as mentioned in #4447 (comment), JSON is probably the best format for this). I converted the built-in themes to JSON files that are included in the final executable. The colors are ported 1:1, so there shouldn't be any visual difference. To keep the parsing code small, I'm using a macro that ensures the JSON keys are the same as the C++ property names.
This is working towards #2237. You can already specify custom themes in the settings, but there's neither UI nor auto-reloading nor a wiki entry for it.