pub trait Pressable:
StatefulInteractiveElement
+ Styled
+ Sized {
// Provided method
fn pressable(self, cx: &App) -> Self { ... }
}Expand description
The response a control gives while the pointer is held on it.
Provided Methods§
Sourcefn pressable(self, cx: &App) -> Self
fn pressable(self, cx: &App) -> Self
Sinks the control by motion.pressOffsetPx while it is held.
This is a downward shift, not a scale: the GPUI revision this library
pins offers a transform on svg alone, so there is no way to scale a
div and pretending otherwise would mean redrawing the control at a
different size, which is a layout change wearing a costume. A press is
therefore reported the way a physical key reports one — it goes down.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".