From fa6935048f9783a1be86b329f5448a052f455a85 Mon Sep 17 00:00:00 2001 From: Wing <44992537+wingio@users.noreply.github.com> Date: Fri, 19 Jul 2024 17:12:18 -0400 Subject: [PATCH] Use newer TextStyle constructor --- build.gradle.kts | 2 +- .../syntakts/compose/material3/clickable/ClickableText.kt | 3 ++- .../xyz/wingio/syntakts/compose/clickable/ClickableText.kt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a042281..dd605f5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ buildscript { dependencies { classpath(libs.plugin.maven) classpath(libs.plugin.multiplatform.compose) - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") } } diff --git a/syntakts-compose-material3/src/commonMain/kotlin/xyz/wingio/syntakts/compose/material3/clickable/ClickableText.kt b/syntakts-compose-material3/src/commonMain/kotlin/xyz/wingio/syntakts/compose/material3/clickable/ClickableText.kt index 0bc67bf..26fce2a 100644 --- a/syntakts-compose-material3/src/commonMain/kotlin/xyz/wingio/syntakts/compose/material3/clickable/ClickableText.kt +++ b/syntakts-compose-material3/src/commonMain/kotlin/xyz/wingio/syntakts/compose/material3/clickable/ClickableText.kt @@ -58,7 +58,7 @@ public fun ClickableText( fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, - textAlign: TextAlign? = null, + textAlign: TextAlign = TextAlign.Unspecified, lineHeight: TextUnit = TextUnit.Unspecified, style: TextStyle = LocalTextStyle.current, overflow: TextOverflow = TextOverflow.Clip, @@ -75,6 +75,7 @@ public fun ClickableText( LocalContentColor.current } } + TextStyle() val textStyle = style.merge( TextStyle( color = textColor, diff --git a/syntakts-compose/src/commonMain/kotlin/xyz/wingio/syntakts/compose/clickable/ClickableText.kt b/syntakts-compose/src/commonMain/kotlin/xyz/wingio/syntakts/compose/clickable/ClickableText.kt index 2bf7bb9..f5836ae 100644 --- a/syntakts-compose/src/commonMain/kotlin/xyz/wingio/syntakts/compose/clickable/ClickableText.kt +++ b/syntakts-compose/src/commonMain/kotlin/xyz/wingio/syntakts/compose/clickable/ClickableText.kt @@ -59,7 +59,7 @@ public fun ClickableText( fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, - textAlign: TextAlign? = null, + textAlign: TextAlign = TextAlign.Unspecified, lineHeight: TextUnit = TextUnit.Unspecified, style: TextStyle = TextStyle(), overflow: TextOverflow = TextOverflow.Clip,