refactor: specially function param names

This commit is contained in:
2023-11-30 12:48:26 +08:00
parent 94a5eb53e0
commit 3ced4acbd3
3 changed files with 3 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ fun NavigationItem(
val currentContentShape = contentShape ?: LocalNavigationContentShape.current ?: Navigation.style.contentShape
val animatedIndicatorColor by animateColorAsState(if (selected) currentColors.indicatorColor else Color.Transparent)
val animatedContentColor by animateColorAsState(if (selected) currentColors.selectedContentColor else currentColors.unselectedContentColor)
val currentContentStyle = LocalTextStyle.current.copy(animatedContentColor)
val currentContentStyle = LocalTextStyle.current.copy(color = animatedContentColor)
Box(
modifier = Modifier.status(enabled)
.clip(currentContentShape)

View File

@@ -210,7 +210,7 @@ fun Tab(
val currentContentPadding = contentPadding ?: LocalTabContentPadding.current ?: Tab.style.contentPadding
val currentContentShape = contentShape ?: LocalTabContentShape.current ?: Tab.style.contentShape
val contentColor by animateColorAsState(if (selected) currentSelectedContentColor else currentUnselectedContentColor)
val contentStyle = LocalTextStyle.current.copy(contentColor)
val contentStyle = LocalTextStyle.current.copy(color = contentColor)
CompositionLocalProvider(
LocalIconTint provides contentColor,
LocalTextStyle provides contentStyle

View File

@@ -683,7 +683,7 @@ private fun TextFieldDecorationBox(
val animatedAlpha by animateFloatAsState(if (value.isNotEmpty()) 0f else 1f)
Box(modifier = Modifier.alpha(animatedAlpha)) {
CompositionLocalProvider(
LocalTextStyle provides LocalTextStyle.current.copy(placeholderContentColor)
LocalTextStyle provides LocalTextStyle.current.copy(color = placeholderContentColor)
) { placeholder() }
}
innerTextField()