mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-09 20:14:18 +08:00
refactor: standardization default line height
This commit is contained in:
@@ -41,27 +41,29 @@ data class Typography(
|
|||||||
|
|
||||||
internal val LocalTypography = staticCompositionLocalOf { DefaultTypography }
|
internal val LocalTypography = staticCompositionLocalOf { DefaultTypography }
|
||||||
|
|
||||||
|
private val DefaultLineHeight = 1.5.em
|
||||||
|
|
||||||
internal val DefaultTypography = Typography(
|
internal val DefaultTypography = Typography(
|
||||||
titlePrimary = TextStyle(
|
titlePrimary = TextStyle(
|
||||||
fontSize = 25.sp,
|
fontSize = 25.sp,
|
||||||
lineHeight = 1.5.em,
|
lineHeight = DefaultLineHeight,
|
||||||
fontWeight = FontWeight.Bold
|
fontWeight = FontWeight.Bold
|
||||||
),
|
),
|
||||||
titleSecondary = TextStyle(
|
titleSecondary = TextStyle(
|
||||||
fontSize = 18.sp,
|
fontSize = 18.sp,
|
||||||
lineHeight = 1.2.em,
|
lineHeight = DefaultLineHeight,
|
||||||
fontWeight = FontWeight.Bold
|
fontWeight = FontWeight.Bold
|
||||||
),
|
),
|
||||||
subtitle = TextStyle(
|
subtitle = TextStyle(
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 1.em
|
lineHeight = DefaultLineHeight
|
||||||
),
|
),
|
||||||
primary = TextStyle(
|
primary = TextStyle(
|
||||||
fontSize = 15.sp,
|
fontSize = 15.sp,
|
||||||
lineHeight = 1.2.em
|
lineHeight = DefaultLineHeight
|
||||||
),
|
),
|
||||||
secondary = TextStyle(
|
secondary = TextStyle(
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
lineHeight = 1.em
|
lineHeight = DefaultLineHeight
|
||||||
)
|
)
|
||||||
)
|
)
|
Reference in New Issue
Block a user