1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04: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.
///
/// 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<S: WidgetStyle + 'static>(
&self,

View File

@@ -228,12 +228,27 @@ impl Default for Themes {
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 }
}
}
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<S: WidgetStyle + 'static>(