val headlineRegular: TextStyle = TextStyle(
fontWeight = FontWeight.W400,
fontSize = 16.sp,
lineHeight = 22.4.sp,
letterSpacing = 0.3.sp,
platformStyle = PlatformTextStyle(
includeFontPadding = false
),
),
with platformStyle = PlatformTextStyle(includeFontPadding = true)
:
without:
text is not centered within the container.
So what did they fix exactly?
My code:
TextButton(
modifier = modifier,
enabled = enabled,
colors = colors,
onClick = onClick
) {
Icon(
painter = painterResource(id = R.drawable.ic_logout),
contentDescription = "Logout icon",
modifier = Modifier
)
Spacer(modifier = Modifier.width(4.dp))
Text(
text = stringResource(R.string.logout),
style = LocalAppType.current.headlineRegular
)
}