pub struct ButtonStyle {
pub background: Option<Color>,
pub hover: Option<Color>,
pub pressed: Option<Color>,
pub disabled: Option<Color>,
pub text: Option<Color>,
pub text_disabled: Option<Color>,
pub font_size: Option<f32>,
pub font_weight: Option<u16>,
pub radius: Option<f32>,
pub padding: Option<(f32, f32)>,
pub border_width: Option<f32>,
pub border_color: Option<Color>,
}Fields§
§background: Option<Color>§hover: Option<Color>§pressed: Option<Color>§disabled: Option<Color>§text: Option<Color>§text_disabled: Option<Color>§font_size: Option<f32>§font_weight: Option<u16>§radius: Option<f32>§padding: Option<(f32, f32)>§border_width: Option<f32>§border_color: Option<Color>Implementations§
Source§impl ButtonStyle
impl ButtonStyle
pub const PRIMARY: ButtonStyle
pub const SECONDARY: ButtonStyle
pub const DANGER: ButtonStyle
pub const GHOST: ButtonStyle
Sourcepub const OUTLINE: ButtonStyle
pub const OUTLINE: ButtonStyle
Neutral outlined button for secondary actions on light or dark surfaces.
pub const DARK_FILLED: ButtonStyle
pub const OUTLINE_ROSE: ButtonStyle
pub const fn new() -> ButtonStyle
pub const fn primary() -> ButtonStyle
pub const fn secondary() -> ButtonStyle
pub const fn danger() -> ButtonStyle
pub const fn ghost() -> ButtonStyle
pub const fn outline() -> ButtonStyle
pub const fn dark_filled() -> ButtonStyle
pub const fn outline_rose() -> ButtonStyle
pub const fn background(self, color: Color) -> ButtonStyle
pub const fn hover(self, color: Color) -> ButtonStyle
pub const fn pressed(self, color: Color) -> ButtonStyle
pub const fn disabled(self, color: Color) -> ButtonStyle
pub const fn text(self, color: Color) -> ButtonStyle
pub const fn text_disabled(self, color: Color) -> ButtonStyle
pub const fn font_size(self, size: f32) -> ButtonStyle
pub const fn font_weight(self, weight: u16) -> ButtonStyle
pub const fn radius(self, radius: f32) -> ButtonStyle
pub const fn padding_xy(self, pad_x: f32, pad_y: f32) -> ButtonStyle
pub const fn border_width(self, width: f32) -> ButtonStyle
pub const fn border_color(self, color: Color) -> ButtonStyle
pub const fn border(self, width: f32, color: Color) -> ButtonStyle
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ButtonStyle
Source§impl Debug for ButtonStyle
impl Debug for ButtonStyle
Source§impl Default for ButtonStyle
impl Default for ButtonStyle
Source§fn default() -> ButtonStyle
fn default() -> ButtonStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for ButtonStyle
impl PartialEq for ButtonStyle
impl StructuralPartialEq 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 UnsafeUnpin 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