pub struct FilledButtonStyle {
pub color: Color,
}Expand description
A filled, rounded button style: a solid color background with a white label and comfortable
padding, composed from Decorate::padding/Decorate::background/Decorate::corner_radius.
v1 is static (no pressed/hover feedback).
Fields§
§color: ColorTrait Implementations§
Source§impl ButtonStyle for FilledButtonStyle
impl ButtonStyle for FilledButtonStyle
Source§fn body(&self, label: AnyPiece) -> AnyPiece
fn body(&self, label: AnyPiece) -> AnyPiece
Build the button’s visual body from its (type-erased)
label piece.Source§fn label_color(&self) -> Option<Color>
fn label_color(&self) -> Option<Color>
An optional label color applied by
Button::style BEFORE the label reaches body.
Defaults to None (the label keeps its intrinsic color). A filled/colored style overrides
this to guarantee contrast — since body gets the label type-erased and cannot recolor it,
this is the seam through which a style tints its label. FilledButtonStyle returns white.Auto Trait Implementations§
impl Freeze for FilledButtonStyle
impl RefUnwindSafe for FilledButtonStyle
impl Send for FilledButtonStyle
impl Sync for FilledButtonStyle
impl Unpin for FilledButtonStyle
impl UnsafeUnpin for FilledButtonStyle
impl UnwindSafe for FilledButtonStyle
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more