You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, when the system theme changes, the Visuals theme is switched to the hard-coded egui::Visuals::dark() or egui::Visuals::light(). I would like for there to be an option to use custom Visuals for dark and light themes.
This seems to be where the system theme change is detected and the egui visuals are set:
Describe the solution you'd like
There should be some way to pass a Visuals that corresponds to the dark theme, and another Visuals which corresponds to the light theme. Then, when a theme change is needed, those custom themes would be used instead of the hard-coded egui::Visuals::dark() or egui::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:
The global style is stored in Options::style, and I suggest we split that into three fields:
structOptions{pubdark_mode_style:Arc<Style>,publight_mode_style:Arc<Style>,pubtheme:Theme,// Dark or Lightpubfollow_system_theme:bool,// Change [`Self::theme`] based on `RawInput::system_theme`?
…
}
with enum Theme { Dark, Light } (move the one in eframe into egui).
Then move IntegrationInfo::system_theme into RawInput.
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: