pub struct LineHeightStyle {
pub alignment: LineHeightAlignment,
pub trim: LineHeightTrim,
pub mode: LineHeightMode,
}Expand description
How a line of text sits inside the height it was given, and what a paragraph gives back at its edges.
Text is laid out by AOSP’s StaticLayout rule, as Jetpack Compose lays it
out: whole-pixel metrics, the leading placed by alignment, and the
leading above the first line and below the last given back by trim. The
Default is Compose’s own, which is what a style that names none gets.
Fields§
§alignment: LineHeightAlignmentWhere the leading of each line is spent.
trim: LineHeightTrimWhich edges of the text block give their leading back.
mode: LineHeightModeWhat a requested line height means when the font does not fit inside it.
Trait Implementations§
Source§impl Clone for LineHeightStyle
impl Clone for LineHeightStyle
Source§fn clone(&self) -> LineHeightStyle
fn clone(&self) -> LineHeightStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LineHeightStyle
Source§impl Debug for LineHeightStyle
impl Debug for LineHeightStyle
Source§impl Default for LineHeightStyle
impl Default for LineHeightStyle
Source§fn default() -> LineHeightStyle
fn default() -> LineHeightStyle
Returns the “default value” for a type. Read more
impl Eq for LineHeightStyle
Source§impl Hash for LineHeightStyle
impl Hash for LineHeightStyle
Source§impl PartialEq for LineHeightStyle
impl PartialEq for LineHeightStyle
impl StructuralPartialEq for LineHeightStyle
Auto Trait Implementations§
impl Forget for LineHeightStyle
impl Freeze for LineHeightStyle
impl Move for LineHeightStyle
impl RefUnwindSafe for LineHeightStyle
impl Send for LineHeightStyle
impl Sync for LineHeightStyle
impl Unpin for LineHeightStyle
impl UnsafeUnpin for LineHeightStyle
impl UnwindSafe for LineHeightStyle
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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