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:
@@ -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,
|
||||
|
||||
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user