pub struct Theme {Show 15 fields
pub primary_color: Color,
pub secondary_color: Color,
pub accent_color: Color,
pub background_color: Color,
pub text_color: Color,
pub border_color: Color,
pub success_color: Color,
pub warning_color: Color,
pub error_color: Color,
pub info_color: Color,
pub spacing: SpacingScale,
pub typography: TypographyScale,
pub shadows: ShadowScale,
pub borders: BorderScale,
pub animations: AnimationScale,
}
Expand description
Main theme structure according to API documentation
Fields§
§primary_color: Color
§secondary_color: Color
§accent_color: Color
§background_color: Color
§text_color: Color
§border_color: Color
§success_color: Color
§warning_color: Color
§error_color: Color
§info_color: Color
§spacing: SpacingScale
§typography: TypographyScale
§shadows: ShadowScale
§borders: BorderScale
§animations: AnimationScale
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn primary_color(self, color: Color) -> Self
pub fn primary_color(self, color: Color) -> Self
Sets the primary color for the theme
Sourcepub fn secondary_color(self, color: Color) -> Self
pub fn secondary_color(self, color: Color) -> Self
Sets the secondary color for the theme
Sourcepub fn accent_color(self, color: Color) -> Self
pub fn accent_color(self, color: Color) -> Self
Sets the accent color for the theme
Sourcepub fn background_color(self, color: Color) -> Self
pub fn background_color(self, color: Color) -> Self
Sets the background color for the theme
Sourcepub fn text_color(self, color: Color) -> Self
pub fn text_color(self, color: Color) -> Self
Sets the text color for the theme
Sourcepub fn apply_to_component(&self, component: &dyn ThemedComponent) -> String
pub fn apply_to_component(&self, component: &dyn ThemedComponent) -> String
Applies theme to a component
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more