pub struct PressableStyle {
pub background: Option<Fill>,
pub border: Option<Stroke>,
pub corner_radius: Option<f32>,
pub shadows: Option<Vec<BoxShadow>>,
pub padding: Option<[Length; 4]>,
pub opacity: Option<f32>,
pub scale: Option<f32>,
}Expand description
Partial visual style used by a Pressable interaction state.
Every property is opt-in. An empty style adds no fill, padding, border, shadow, opacity, scale, or geometry.
Fields§
§background: Option<Fill>Background fill for the pressable’s content box.
border: Option<Stroke>Border stroke.
corner_radius: Option<f32>Corner radius in logical points.
shadows: Option<Vec<BoxShadow>>Ordered outer or inset shadows.
padding: Option<[Length; 4]>Inner spacing in [left, right, top, bottom] order.
opacity: Option<f32>Compositor opacity; 0.0 is transparent and 1.0 is opaque.
scale: Option<f32>Uniform compositor scale; 1.0 is unchanged size.
Trait Implementations§
Source§impl Clone for PressableStyle
impl Clone for PressableStyle
Source§fn clone(&self) -> PressableStyle
fn clone(&self) -> PressableStyle
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 moreSource§impl Debug for PressableStyle
impl Debug for PressableStyle
Source§impl Default for PressableStyle
impl Default for PressableStyle
Source§fn default() -> PressableStyle
fn default() -> PressableStyle
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PressableStyle
impl<'de> Deserialize<'de> for PressableStyle
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 PressableStyle
impl PartialEq for PressableStyle
Source§impl Serialize for PressableStyle
impl Serialize for PressableStyle
impl StructuralPartialEq for PressableStyle
Auto Trait Implementations§
impl Freeze for PressableStyle
impl RefUnwindSafe for PressableStyle
impl Send for PressableStyle
impl Sync for PressableStyle
impl Unpin for PressableStyle
impl UnsafeUnpin for PressableStyle
impl UnwindSafe for PressableStyle
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.