pub struct ThemeProps {
pub active_colors: ThemeColorsBundle,
pub background_colors: ThemeColorsBundle,
pub content_backgrounds: HashMap<String, ThemedImageMaterial>,
pub button_backgrounds: HashMap<String, ThemedButtonMaterial>,
pub icons_level_sizes: Vec<f32>,
pub text_variants: HashMap<String, ThemedTextMaterial>,
pub switch_variants: HashMap<String, ThemedSwitchMaterial>,
pub slider_variants: HashMap<String, ThemedSliderMaterial>,
pub modal_shadow_variants: HashMap<String, Color>,
}
Fields§
§active_colors: ThemeColorsBundle
§background_colors: ThemeColorsBundle
§content_backgrounds: HashMap<String, ThemedImageMaterial>
§icons_level_sizes: Vec<f32>
§text_variants: HashMap<String, ThemedTextMaterial>
§switch_variants: HashMap<String, ThemedSwitchMaterial>
§slider_variants: HashMap<String, ThemedSliderMaterial>
§modal_shadow_variants: HashMap<String, Color>
Implementations§
Source§impl ThemeProps
impl ThemeProps
pub fn active_colors(self, bundle: ThemeColorsBundle) -> ThemeProps
pub fn background_colors(self, bundle: ThemeColorsBundle) -> ThemeProps
pub fn content_background( self, id: impl ToString, material: ThemedImageMaterial, ) -> ThemeProps
pub fn icons_level_size(self, level: usize, size: f32) -> ThemeProps
pub fn text_variant( self, id: impl ToString, material: ThemedTextMaterial, ) -> ThemeProps
pub fn switch_variant( self, id: impl ToString, material: ThemedSwitchMaterial, ) -> ThemeProps
pub fn slider_variant( self, id: impl ToString, material: ThemedSliderMaterial, ) -> ThemeProps
pub fn modal_shadow_variant(self, id: impl ToString, color: Color) -> ThemeProps
Trait Implementations§
Source§impl Clone for ThemeProps
impl Clone for ThemeProps
Source§fn clone(&self) -> ThemeProps
fn clone(&self) -> ThemeProps
Returns a copy of the value. Read more
1.0.0 · 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 ThemeProps
impl Debug for ThemeProps
Source§impl Default for ThemeProps
impl Default for ThemeProps
Source§fn default() -> ThemeProps
fn default() -> ThemeProps
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ThemeProps
impl<'de> Deserialize<'de> for ThemeProps
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeProps, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeProps, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Prefab for ThemeProps
impl Prefab for ThemeProps
fn from_prefab(data: Value) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Value, PrefabError>
Source§impl PropsData for ThemePropswhere
ThemeProps: Clone,
impl PropsData for ThemePropswhere
ThemeProps: Clone,
Source§impl Serialize for ThemeProps
impl Serialize for ThemeProps
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ThemeProps
impl RefUnwindSafe for ThemeProps
impl Send for ThemeProps
impl Sync for ThemeProps
impl Unpin for ThemeProps
impl UnwindSafe for ThemeProps
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