mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
outdated comments
This commit is contained in:
@@ -2031,7 +2031,7 @@ impl Context {
|
||||
}
|
||||
|
||||
impl Context {
|
||||
/// Register a [`ThemeStyle`](crate::theme_plugin::ThemeStyle) for the specified widget type.
|
||||
/// Register a [`StyleProvider`](crate::theme_plugin::StyleProvider) for the specified widget type.
|
||||
///
|
||||
/// A theme can only be added once for a specified widget.
|
||||
/// If a theme is already registered for this widget, this is a no-op (useful for `eframe::run_simple_native`).
|
||||
@@ -2044,7 +2044,7 @@ impl Context {
|
||||
self.write(|ctx| ctx.themes.register::<S>(theme, false));
|
||||
}
|
||||
|
||||
/// Register a [`ThemeStyle`](crate::theme_plugin::ThemeStyle) for the specified widget.
|
||||
/// Register a [`StyleProvider`](crate::theme_plugin::StyleProvider) for the specified widget.
|
||||
///
|
||||
/// Overwrite any theme already registered for the specified widget [`WidgetStyle`].
|
||||
/// This allow to live edit a theme.
|
||||
|
||||
@@ -12,7 +12,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
|
||||
/// A cache that can be implemented to reduce computation time of a `ThemeStyle`
|
||||
/// A cache that can be implemented to reduce computation time of a `StyleProvider`
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct ThemeCache<Theme> {
|
||||
cache: IdTypeMap,
|
||||
@@ -270,7 +270,7 @@ impl Default for Themes {
|
||||
}
|
||||
|
||||
impl Themes {
|
||||
/// Register a [`ThemeStyle`] for the specified widget [`WidgetStyle`] `S`
|
||||
/// Register a [`StyleProvider`] 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