-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Custom light & dark themes on system theme change #4490
Comments
100% agree with this. The global style is stored in struct Options {
pub dark_mode_style: Arc<Style>,
pub light_mode_style: Arc<Style>,
pub theme: Theme, // Dark or Light
…
} with PRs welcome! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently, when the system theme changes, the
Visuals
theme is switched to the hard-codedegui::Visuals::dark()
oregui::Visuals::light()
. I would like for there to be an option to use customVisuals
for dark and light themes.This seems to be where the system theme change is detected and the egui visuals are set:
egui/crates/eframe/src/native/epi_integration.rs
Line 271 in c3f386a
And this seems to be where the hard-coded
Visuals
are set:egui/crates/eframe/src/epi.rs
Lines 501 to 506 in c3f386a
Describe the solution you'd like
There should be some way to pass a
Visuals
that corresponds to the dark theme, and anotherVisuals
which corresponds to the light theme. Then, when a theme change is needed, those custom themes would be used instead of the hard-codedegui::Visuals::dark()
oregui::Visuals::light()
.Describe alternatives you've considered
None
Additional context
I am working on https://github.com/damus-io/notedeck and we would like to support custom theming at some point. It's not a high priority at the moment, and I would be open to submitting a PR for this feature in the future.
The text was updated successfully, but these errors were encountered: