pub struct ButtonStyle {
pub variant: ButtonVariant,
pub focused_fg: Color,
pub focused_bg: Color,
pub unfocused_fg: Color,
pub unfocused_bg: Color,
pub disabled_fg: Color,
pub pressed_fg: Color,
pub pressed_bg: Color,
pub toggled_fg: Color,
pub toggled_bg: Color,
}Expand description
Button styling.
Fields§
§variant: ButtonVariantThe button variant.
focused_fg: ColorForeground color when focused.
focused_bg: ColorBackground color when focused.
unfocused_fg: ColorForeground color when unfocused.
unfocused_bg: ColorBackground color when unfocused.
disabled_fg: ColorForeground color when disabled.
pressed_fg: ColorForeground color when pressed.
pressed_bg: ColorBackground color when pressed.
toggled_fg: ColorForeground color when toggled.
toggled_bg: ColorBackground color when toggled.
Implementations§
Source§impl ButtonStyle
impl ButtonStyle
Sourcepub fn new(variant: ButtonVariant) -> Self
pub fn new(variant: ButtonVariant) -> Self
Create a style for a specific variant.
Sourcepub fn variant(self, variant: ButtonVariant) -> Self
pub fn variant(self, variant: ButtonVariant) -> Self
Set the variant.
Trait Implementations§
Source§impl Clone for ButtonStyle
impl Clone for ButtonStyle
Source§fn clone(&self) -> ButtonStyle
fn clone(&self) -> ButtonStyle
Returns a duplicate 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 ButtonStyle
impl Debug for ButtonStyle
Auto Trait Implementations§
impl Freeze for ButtonStyle
impl RefUnwindSafe for ButtonStyle
impl Send for ButtonStyle
impl Sync for ButtonStyle
impl Unpin for ButtonStyle
impl UnwindSafe for ButtonStyle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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