pub struct ControlBox {
pub padding_horizontal: f32,
pub padding_vertical: f32,
pub padding: [f32; 4],
pub border_width: f32,
pub gap: f32,
pub min_width: Option<f32>,
pub min_height: Option<f32>,
pub width: Option<f32>,
pub height: Option<f32>,
}Expand description
The control box a leaf’s recipe fixes (padding inside the measured size,
definite sizes taffy already knows). The measurer adds the padding around
the content it shapes and honours min_*. padding_horizontal /
padding_vertical are the AVERAGES of the two sides (a measurer adding
2 × padding gets the exact total); padding has every side.
Fields§
§padding_horizontal: f32§padding_vertical: f32§padding: [f32; 4][top, right, bottom, left], logical keys resolved by the direction.
border_width: f32§gap: f32§min_width: Option<f32>§min_height: Option<f32>§width: Option<f32>§height: Option<f32>Trait Implementations§
Source§impl Clone for ControlBox
impl Clone for ControlBox
impl Copy for ControlBox
Source§impl Debug for ControlBox
impl Debug for ControlBox
Source§impl Default for ControlBox
impl Default for ControlBox
Source§impl<'de> Deserialize<'de> for ControlBox
impl<'de> Deserialize<'de> for ControlBox
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 ControlBox
impl PartialEq for ControlBox
Source§impl Serialize for ControlBox
impl Serialize for ControlBox
impl StructuralPartialEq for ControlBox
Auto Trait Implementations§
impl Freeze for ControlBox
impl RefUnwindSafe for ControlBox
impl Send for ControlBox
impl Sync for ControlBox
impl Unpin for ControlBox
impl UnsafeUnpin for ControlBox
impl UnwindSafe for ControlBox
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