From 3ced4acbd3b9c93f2f08ce407018ca2ad422ca56 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Thu, 30 Nov 2023 12:48:26 +0800 Subject: [PATCH] refactor: specially function param names --- .../kotlin/com/highcapable/flexiui/component/Navigation.kt | 2 +- .../commonMain/kotlin/com/highcapable/flexiui/component/Tab.kt | 2 +- .../kotlin/com/highcapable/flexiui/component/TextField.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Navigation.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Navigation.kt index fb205c9..56b2c3c 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Navigation.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Navigation.kt @@ -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) diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Tab.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Tab.kt index bd7042f..1642f5c 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Tab.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Tab.kt @@ -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 diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt index 2fae1f2..0ddcfb2 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt @@ -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()