pub struct PartialTheme {
pub background: Option<Color>,
pub surface: Option<Color>,
pub primary: Option<Color>,
pub on_primary: Option<Color>,
pub text_primary: Option<Color>,
pub text_secondary: Option<Color>,
pub font_family: Option<String>,
pub font_size: Option<f32>,
pub font_weight: Option<u16>,
}Expand description
A partial palette/font override — every field is optional.
Fields set to Some(…) replace the corresponding field in the base theme.
None fields keep the base value unchanged.
Fields§
§background: Option<Color>Override for the background colour.
surface: Option<Color>Override for the surface colour.
primary: Option<Color>Override for the primary brand colour.
on_primary: Option<Color>Override for the on-primary colour.
text_primary: Option<Color>Override for the primary text colour.
text_secondary: Option<Color>Override for the muted / secondary text colour.
font_family: Option<String>Override for the font family name.
font_size: Option<f32>Override for the font size in logical pixels.
font_weight: Option<u16>Override for the font weight.
Trait Implementations§
Source§impl Clone for PartialTheme
impl Clone for PartialTheme
Source§fn clone(&self) -> PartialTheme
fn clone(&self) -> PartialTheme
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartialTheme
impl Debug for PartialTheme
Source§impl Default for PartialTheme
impl Default for PartialTheme
Source§fn default() -> PartialTheme
fn default() -> PartialTheme
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PartialTheme
impl RefUnwindSafe for PartialTheme
impl Send for PartialTheme
impl Sync for PartialTheme
impl Unpin for PartialTheme
impl UnsafeUnpin for PartialTheme
impl UnwindSafe for PartialTheme
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