diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 982f7d146..ff9e295be 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -2046,7 +2046,7 @@ impl Context { /// Register a [`ThemeStyle`](crate::theme_plugin::ThemeStyle) for the specified widget. /// - /// Overwrite any theme already registered for the specified widget [`WidgetStyle`](WidgetStyle). + /// Overwrite any theme already registered for the specified widget [`WidgetStyle`]. /// This allow to live edit a theme. pub fn replace_widget_theme( &self, diff --git a/crates/egui/src/theme_plugin.rs b/crates/egui/src/theme_plugin.rs index faa685248..724a22c13 100644 --- a/crates/egui/src/theme_plugin.rs +++ b/crates/egui/src/theme_plugin.rs @@ -228,12 +228,27 @@ impl Default for Themes { Arc::new(Mutex::new(Box::new(DefaultStyle))), ); + themes.insert_temp::>( + Id::NULL, + Arc::new(Mutex::new(Box::new(DefaultStyle))), + ); + + themes.insert_temp::>( + Id::NULL, + Arc::new(Mutex::new(Box::new(DefaultStyle))), + ); + + themes.insert_temp::>( + Id::NULL, + Arc::new(Mutex::new(Box::new(DefaultStyle))), + ); + Self { themes } } } impl Themes { - /// Register a [`ThemeStyle`](crate::theme_plugin::ThemeStyle) for the specified widget [`WidgetStyle`](WidgetStyle) `S` + /// Register a [`ThemeStyle`] for the specified widget [`WidgetStyle`] `S` /// /// Existing themes are overwritten if `force` is `true` or the new theme differs. pub(crate) fn register(