Struct i_slint_core::layout::LayoutInfo
source · #[repr(C)]pub struct LayoutInfo {
pub max: Coord,
pub max_percent: Coord,
pub min: Coord,
pub min_percent: Coord,
pub preferred: Coord,
pub stretch: f32,
}Expand description
The constraint that applies to an item
Fields§
§max: CoordThe maximum size for the item.
max_percent: CoordThe maximum size in percentage of the parent (value between 0 and 100).
min: CoordThe minimum size for this item.
min_percent: CoordThe minimum size in percentage of the parent (value between 0 and 100).
preferred: Coordthe preferred size
stretch: f32the stretch factor
Implementations§
source§impl LayoutInfo
impl LayoutInfo
pub fn merge(&self, other: &LayoutInfo) -> Self
sourcepub fn preferred_bounded(&self) -> Coord
pub fn preferred_bounded(&self) -> Coord
Helper function to return a preferred size which is within the min/max constraints
Trait Implementations§
source§impl Add<LayoutInfo> for LayoutInfo
impl Add<LayoutInfo> for LayoutInfo
source§impl Clone for LayoutInfo
impl Clone for LayoutInfo
source§fn clone(&self) -> LayoutInfo
fn clone(&self) -> LayoutInfo
Returns a copy 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 LayoutInfo
impl Debug for LayoutInfo
source§impl Default for LayoutInfo
impl Default for LayoutInfo
source§impl PartialEq<LayoutInfo> for LayoutInfo
impl PartialEq<LayoutInfo> for LayoutInfo
source§fn eq(&self, other: &LayoutInfo) -> bool
fn eq(&self, other: &LayoutInfo) -> bool
This method tests for
self and other values to be equal, and is used
by ==.