pub enum TileScale {
Regular,
Compact,
}Expand description
The text scale of a tile’s content. Both scales share one composition; settings read one step larger than denser option panels.
Variants§
Regular
Settings pages: body-large (16px) labels over 14px supporting text, the M3 list item headline and supporting roles.
Compact
Denser panels: 16px labels over 13px supporting text.
Implementations§
Source§impl TileScale
impl TileScale
pub fn label_size(self) -> Rems
pub fn support_size(self) -> Rems
Sourcepub fn label_line_height(self) -> Rems
pub fn label_line_height(self) -> Rems
The label’s line box. Tiles that act are Buttons, whose text box is exactly the font size; an explicit line height keeps wrapped and clamped lines (and their descenders) inside it at every text scale.
pub fn support_line_height(self) -> Rems
Sourcepub fn label(
self,
id: impl Into<ElementId>,
value: impl Into<SharedString>,
) -> Stateful<Div>
pub fn label( self, id: impl Into<ElementId>, value: impl Into<SharedString>, ) -> Stateful<Div>
A tile’s main label, medium weight.
Sourcepub fn support(
self,
id: impl Into<ElementId>,
value: impl Into<SharedString>,
) -> Stateful<Div>
pub fn support( self, id: impl Into<ElementId>, value: impl Into<SharedString>, ) -> Stateful<Div>
Supporting text under a tile’s label, regular gray.
Sourcepub fn surface(self, outer: OuterCorners) -> Div
pub fn surface(self, outer: OuterCorners) -> Div
One content tile of a connected group at this scale: the surface, its corners, and the reading size settings content inherits.
A whole tile that acts: the surface with M3 state layers, the tile’s
corners and this scale’s padding. Callers add one TileScale::row
holding the leading slot, text column and trailing items.
Sourcepub fn gap(self) -> Rems
pub fn gap(self) -> Rems
The gap between a tile’s leading slot, text column and trailing items.
Sourcepub fn row(self) -> Div
pub fn row(self) -> Div
The content of a button tile: its leading slot, text column and
trailing items in one row at this scale’s gap. The component’s own
content row has a fixed 8px gap and does not wrap, so a tile’s
children go in here to keep text on the rows’ ruler and let long
labels wrap.
Trait Implementations§
impl Copy for TileScale
impl Eq for TileScale
impl StructuralPartialEq for TileScale
Auto Trait Implementations§
impl Freeze for TileScale
impl RefUnwindSafe for TileScale
impl Send for TileScale
impl Sync for TileScale
impl Unpin for TileScale
impl UnsafeUnpin for TileScale
impl UnwindSafe for TileScale
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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