pub struct ControlTypography {
pub body_font_size: f32,
pub body_line_height: f32,
}Fields§
§body_font_size: f32§body_line_height: f32Implementations§
Source§impl ControlTypography
impl ControlTypography
pub fn from_text_scale(text: &ThemeTextScale) -> Self
Sourcepub fn for_density(text: &ThemeTextScale, density: ThemeDensity) -> Self
pub fn for_density(text: &ThemeTextScale, density: ThemeDensity) -> Self
Legacy density typography. Authored interfaces should prefer
Self::for_size; the legacy Compact/Comfortable/Touch tiers mirror
Small/Medium/Large so both paths resolve the same text-ramp tokens.
Sourcepub fn for_size(text: &ThemeTextScale, size: ControlSize) -> Self
pub fn for_size(text: &ThemeTextScale, size: ControlSize) -> Self
Resolve authored interface-size typography from the current text scale. Text scaling remains independent: each size selects a token from the already-scaled ramp instead of applying another multiplier.
Trait Implementations§
Source§impl Clone for ControlTypography
impl Clone for ControlTypography
impl Copy for ControlTypography
Source§impl Debug for ControlTypography
impl Debug for ControlTypography
Source§impl Default for ControlTypography
impl Default for ControlTypography
Source§impl PartialEq for ControlTypography
impl PartialEq for ControlTypography
impl StructuralPartialEq for ControlTypography
Auto Trait Implementations§
impl Forget for ControlTypography
impl Freeze for ControlTypography
impl Move for ControlTypography
impl RefUnwindSafe for ControlTypography
impl Send for ControlTypography
impl Sync for ControlTypography
impl Unpin for ControlTypography
impl UnsafeUnpin for ControlTypography
impl UnwindSafe for ControlTypography
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