pub enum GridTrackSize {
Fixed(f32),
Percentage(f32),
Flex(Fr),
MinMax(f32, Fr),
MinContent,
MaxContent,
Auto,
}Expand description
The size of a row or a column of a Grid. Compose’s GridTrackSize.
Negative sizes count as zero.
Variants§
Fixed(f32)
A size in dp.
Percentage(f32)
A fraction, from 0 to 1, of the grid’s room after its gaps. With no
bound on the axis the track takes its content’s size, as
GridTrackSize::MaxContent.
Flex(Fr)
A share of the room the other tracks leave, in proportion to the weight, and never smaller than its content’s smallest size.
MinMax(f32, Fr)
At least the dp size, then a share of the room left as
GridTrackSize::Flex. It never asks its content for a size, so a
lazy list can sit in it.
MinContent
The smallest size the content takes.
MaxContent
The size the content takes with no limit.
Auto
At least the content’s smallest size, growing toward the size it takes with no limit while the grid has room.
Trait Implementations§
Source§impl Clone for GridTrackSize
impl Clone for GridTrackSize
impl Copy for GridTrackSize
Source§impl Debug for GridTrackSize
impl Debug for GridTrackSize
Source§impl PartialEq for GridTrackSize
impl PartialEq for GridTrackSize
impl StructuralPartialEq for GridTrackSize
Auto Trait Implementations§
impl Freeze for GridTrackSize
impl RefUnwindSafe for GridTrackSize
impl Send for GridTrackSize
impl Sync for GridTrackSize
impl Unpin for GridTrackSize
impl UnsafeUnpin for GridTrackSize
impl UnwindSafe for GridTrackSize
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> ErasedDestructor for Twhere
T: 'static,
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