1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

amend missing files

This commit is contained in:
adrien
2026-06-26 09:04:48 +02:00
parent 6c802b078b
commit 75641c48f0
2 changed files with 17 additions and 2 deletions

View File

@@ -2046,7 +2046,7 @@ impl Context {
/// Register a [`ThemeStyle`](crate::theme_plugin::ThemeStyle) for the specified widget. /// 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. /// This allow to live edit a theme.
pub fn replace_widget_theme<S: WidgetStyle + 'static>( pub fn replace_widget_theme<S: WidgetStyle + 'static>(
&self, &self,

View File

@@ -228,12 +228,27 @@ impl Default for Themes {
Arc::new(Mutex::new(Box::new(DefaultStyle))), Arc::new(Mutex::new(Box::new(DefaultStyle))),
); );
themes.insert_temp::<ThemeWrap<SeparatorStyle>>(
Id::NULL,
Arc::new(Mutex::new(Box::new(DefaultStyle))),
);
themes.insert_temp::<ThemeWrap<CheckboxStyle>>(
Id::NULL,
Arc::new(Mutex::new(Box::new(DefaultStyle))),
);
themes.insert_temp::<ThemeWrap<LabelStyle>>(
Id::NULL,
Arc::new(Mutex::new(Box::new(DefaultStyle))),
);
Self { themes } Self { themes }
} }
} }
impl 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. /// Existing themes are overwritten if `force` is `true` or the new theme differs.
pub(crate) fn register<S: WidgetStyle + 'static>( pub(crate) fn register<S: WidgetStyle + 'static>(