Trait cosmic::iced_style::button::StyleSheet
source · pub trait StyleSheet {
type Style: Default;
// Required method
fn active(&self, style: &Self::Style) -> Appearance;
// Provided methods
fn hovered(&self, style: &Self::Style) -> Appearance { ... }
fn pressed(&self, style: &Self::Style) -> Appearance { ... }
fn disabled(&self, style: &Self::Style) -> Appearance { ... }
}
Expand description
A set of rules that dictate the style of a button.
Required Associated Types§
sourcetype Style: Default
type Style: Default
The supported style of the StyleSheet
.
Required Methods§
sourcefn active(&self, style: &Self::Style) -> Appearance
fn active(&self, style: &Self::Style) -> Appearance
Produces the active Appearance
of a button.
Provided Methods§
sourcefn hovered(&self, style: &Self::Style) -> Appearance
fn hovered(&self, style: &Self::Style) -> Appearance
Produces the hovered Appearance
of a button.
sourcefn pressed(&self, style: &Self::Style) -> Appearance
fn pressed(&self, style: &Self::Style) -> Appearance
Produces the pressed Appearance
of a button.
sourcefn disabled(&self, style: &Self::Style) -> Appearance
fn disabled(&self, style: &Self::Style) -> Appearance
Produces the disabled Appearance
of a button.