From 9f77410def7f81eadd42f6d4334267ad157aea2a Mon Sep 17 00:00:00 2001 From: Yang Date: Fri, 26 Jan 2024 19:41:21 +1100 Subject: [PATCH] Move to non-deprecated `TextStyle` constructor. --- .../android/foundation/designsystem/component/Text.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/foundation/designsystem/src/main/java/io/github/reactivecircus/kstreamlined/android/foundation/designsystem/component/Text.kt b/android/foundation/designsystem/src/main/java/io/github/reactivecircus/kstreamlined/android/foundation/designsystem/component/Text.kt index 1d7c9935..066e386f 100644 --- a/android/foundation/designsystem/src/main/java/io/github/reactivecircus/kstreamlined/android/foundation/designsystem/component/Text.kt +++ b/android/foundation/designsystem/src/main/java/io/github/reactivecircus/kstreamlined/android/foundation/designsystem/component/Text.kt @@ -21,7 +21,7 @@ public fun Text( modifier: Modifier = Modifier, color: Color = Color.Unspecified, textDecoration: TextDecoration? = null, - textAlign: TextAlign? = null, + textAlign: TextAlign = TextAlign.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, @@ -36,7 +36,7 @@ public fun Text( val mergedStyle = style.merge( TextStyle( color = textColor, - textAlign = textAlign ?: style.textAlign, + textAlign = textAlign, textDecoration = textDecoration, ) ) @@ -59,7 +59,7 @@ public fun Text( modifier: Modifier = Modifier, color: Color = Color.Unspecified, textDecoration: TextDecoration? = null, - textAlign: TextAlign? = null, + textAlign: TextAlign = TextAlign.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, @@ -75,7 +75,7 @@ public fun Text( val mergedStyle = style.merge( TextStyle( color = textColor, - textAlign = textAlign ?: style.textAlign, + textAlign = textAlign, textDecoration = textDecoration, ) )