pub trait ThemeExt {
// Required method
fn active_theme(&self) -> Theme;
}Expand description
Read the theme last passed to apply_to_egui.
Widgets call it once per frame and read the colours egui does not model from it;
the rest come from ui.visuals(), which apply_to_egui sets from the same theme.
use egui_charts::theme::{Theme, ThemeExt, apply_to_egui};
apply_to_egui(ui.ctx(), &Theme::light());
let theme = ui.active_theme();
assert_eq!(theme, Theme::light());
let _on_accent = theme.ui.accent_text;Required Methods§
Sourcefn active_theme(&self) -> Theme
fn active_theme(&self) -> Theme
The theme last applied, or Theme::dark if none has been.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".