From c27f557d723c54611b7456de53ad573221927e43 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Thu, 4 Jan 2024 05:10:58 +0800 Subject: [PATCH] refactor: standardization default line height --- .../kotlin/com/highcapable/flexiui/Typography.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/Typography.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/Typography.kt index 69cdbbd..05377f2 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/Typography.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/Typography.kt @@ -41,27 +41,29 @@ data class Typography( internal val LocalTypography = staticCompositionLocalOf { DefaultTypography } +private val DefaultLineHeight = 1.5.em + internal val DefaultTypography = Typography( titlePrimary = TextStyle( fontSize = 25.sp, - lineHeight = 1.5.em, + lineHeight = DefaultLineHeight, fontWeight = FontWeight.Bold ), titleSecondary = TextStyle( fontSize = 18.sp, - lineHeight = 1.2.em, + lineHeight = DefaultLineHeight, fontWeight = FontWeight.Bold ), subtitle = TextStyle( fontSize = 12.sp, - lineHeight = 1.em + lineHeight = DefaultLineHeight ), primary = TextStyle( fontSize = 15.sp, - lineHeight = 1.2.em + lineHeight = DefaultLineHeight ), secondary = TextStyle( fontSize = 12.sp, - lineHeight = 1.em + lineHeight = DefaultLineHeight ) ) \ No newline at end of file