pub type CosmicComponent = Component;
Aliased Type§
struct CosmicComponent {
pub base: Alpha<Rgb, f32>,
pub hover: Alpha<Rgb, f32>,
pub pressed: Alpha<Rgb, f32>,
pub selected: Alpha<Rgb, f32>,
pub selected_text: Alpha<Rgb, f32>,
pub focus: Alpha<Rgb, f32>,
pub divider: Alpha<Rgb, f32>,
pub on: Alpha<Rgb, f32>,
pub disabled: Alpha<Rgb, f32>,
pub on_disabled: Alpha<Rgb, f32>,
pub border: Alpha<Rgb, f32>,
pub disabled_border: Alpha<Rgb, f32>,
}
Fields§
§base: Alpha<Rgb, f32>
The base color of the widget
hover: Alpha<Rgb, f32>
The color of the widget when it is hovered
pressed: Alpha<Rgb, f32>
the color of the widget when it is pressed
selected: Alpha<Rgb, f32>
the color of the widget when it is selected
selected_text: Alpha<Rgb, f32>
the color of the widget when it is selected
focus: Alpha<Rgb, f32>
the color of the widget when it is focused
divider: Alpha<Rgb, f32>
the color of dividers for this widget
on: Alpha<Rgb, f32>
the color of text for this widget
disabled: Alpha<Rgb, f32>
the color of the widget when it is disabled
on_disabled: Alpha<Rgb, f32>
the color of text in the widget when it is disabled
border: Alpha<Rgb, f32>
the color of the border for the widget
disabled_border: Alpha<Rgb, f32>
the color of the border for the widget when it is disabled
Implementations
source§impl Component
impl Component
sourcepub fn hover_state_color(&self) -> Alpha<Rgb, f32>
pub fn hover_state_color(&self) -> Alpha<Rgb, f32>
get @hover_state_color
sourcepub fn pressed_state_color(&self) -> Alpha<Rgb, f32>
pub fn pressed_state_color(&self) -> Alpha<Rgb, f32>
get @pressed_state_color
sourcepub fn selected_state_color(&self) -> Alpha<Rgb, f32>
pub fn selected_state_color(&self) -> Alpha<Rgb, f32>
get @selected_state_color
sourcepub fn selected_state_text_color(&self) -> Alpha<Rgb, f32>
pub fn selected_state_text_color(&self) -> Alpha<Rgb, f32>
get @selected_state_text_color
sourcepub fn focus_color(&self) -> Alpha<Rgb, f32>
pub fn focus_color(&self) -> Alpha<Rgb, f32>
get @focus_color
sourcepub fn colored_component(
base: Alpha<Rgb, f32>,
neutral: Alpha<Rgb, f32>,
accent: Alpha<Rgb, f32>,
hovered: Alpha<Rgb, f32>,
pressed: Alpha<Rgb, f32>,
) -> Component
pub fn colored_component( base: Alpha<Rgb, f32>, neutral: Alpha<Rgb, f32>, accent: Alpha<Rgb, f32>, hovered: Alpha<Rgb, f32>, pressed: Alpha<Rgb, f32>, ) -> Component
helper for producing a component from a base color a neutral and an accent
helper for producing a button component
Trait Implementations
source§impl<'de> Deserialize<'de> for Component
impl<'de> Deserialize<'de> for Component
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Component, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Component, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Component
impl Serialize for Component
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