Skip to main content

apply_to_egui

Function apply_to_egui 

Source
pub fn apply_to_egui(ctx: &Context, theme: &Theme)
Expand description

Apply theme to egui’s visuals and store it for ThemeExt::active_theme. Also install Roboto ahead of the application’s proportional fonts.

Call it once at startup and again after the theme changes. Inside eframe::App::ui the root Ui already exists, so follow the call with ui.set_style(ui.ctx().global_style()) for the panels shown in that Ui to use the theme in the same frame.