pub struct ButtonTheme {
pub height: f32,
pub padding_horizontal: f32,
pub padding_vertical: f32,
pub radius: f32,
pub text_size: f32,
pub elevation_rest: Option<BoxShadow>,
pub elevation_hover: Option<BoxShadow>,
pub elevation_pressed: Option<BoxShadow>,
pub focus_stroke: Option<Stroke>,
}Expand description
Visual parameters for the Button widget.
Includes dimensions, padding, corner radius, text size, elevation for rest/hover/pressed states, and an optional focus stroke.
Fields§
§height: f32§padding_horizontal: f32§padding_vertical: f32§radius: f32§text_size: f32§elevation_rest: Option<BoxShadow>§elevation_hover: Option<BoxShadow>§elevation_pressed: Option<BoxShadow>§focus_stroke: Option<Stroke>Implementations§
Source§impl ButtonTheme
impl ButtonTheme
pub fn from_tokens(tokens: &Tokens) -> Self
Trait Implementations§
Source§impl Clone for ButtonTheme
impl Clone for ButtonTheme
Source§fn clone(&self) -> ButtonTheme
fn clone(&self) -> ButtonTheme
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 ButtonTheme
impl Debug for ButtonTheme
Source§impl<'de> Deserialize<'de> for ButtonTheme
impl<'de> Deserialize<'de> for ButtonTheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ButtonTheme
impl PartialEq for ButtonTheme
Source§impl Serialize for ButtonTheme
impl Serialize for ButtonTheme
impl StructuralPartialEq for ButtonTheme
Auto Trait Implementations§
impl Freeze for ButtonTheme
impl RefUnwindSafe for ButtonTheme
impl Send for ButtonTheme
impl Sync for ButtonTheme
impl Unpin for ButtonTheme
impl UnsafeUnpin for ButtonTheme
impl UnwindSafe for ButtonTheme
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