pub struct PressBox {
pub height: Pixels,
pub padding_x: Option<Pixels>,
pub width: Option<Pixels>,
pub min_width: Option<Pixels>,
pub text_size: Pixels,
pub line_height: Pixels,
pub gap: Pixels,
pub radius: Pixels,
pub scale: f32,
pub shrink_x: bool,
}Expand description
Everything a pressed control scales down.
Fields§
§height: PixelsResting height.
padding_x: Option<Pixels>Horizontal padding for a control that sizes to its content, or None
for one with a fixed width.
width: Option<Pixels>Fixed width, for a square icon-only control.
min_width: Option<Pixels>Minimum width, which has to scale too or it pins the box at full size.
text_size: PixelsFont size.
line_height: PixelsLine height.
gap: PixelsGap between children.
radius: PixelsCorner radius.
scale: f32How far the press scales. v3 uses 0.97 for a button, 0.98 for a menu row, 0.96 and 0.95 for the smaller controls, so it is per control rather than one constant.
shrink_x: boolFalse for a full-width control, whose width is its parent’s: a horizontal margin there would overflow rather than inset.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PressBox
impl RefUnwindSafe for PressBox
impl Send for PressBox
impl Sync for PressBox
impl Unpin for PressBox
impl UnsafeUnpin for PressBox
impl UnwindSafe for PressBox
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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