mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
amend missing files
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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>(
|
||||||
|
|||||||
Reference in New Issue
Block a user