From 8db88534f9e43a422b7c1b8e4c35fc919b3e410c Mon Sep 17 00:00:00 2001 From: Sebastian Aigner Date: Sun, 5 Mar 2023 22:15:25 +0100 Subject: [PATCH] Fix letter-spacing (override material design defaults back to 0.sp) (#2827) --- .../commonMain/kotlin/example/imageviewer/style/Palette.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/experimental/examples/imageviewer/shared/src/commonMain/kotlin/example/imageviewer/style/Palette.kt b/experimental/examples/imageviewer/shared/src/commonMain/kotlin/example/imageviewer/style/Palette.kt index f549d5767c..e7a4946e5a 100755 --- a/experimental/examples/imageviewer/shared/src/commonMain/kotlin/example/imageviewer/style/Palette.kt +++ b/experimental/examples/imageviewer/shared/src/commonMain/kotlin/example/imageviewer/style/Palette.kt @@ -1,10 +1,13 @@ package example.imageviewer.style import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ProvideTextStyle import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.sp object ImageviewerColors { val Gray = Color.DarkGray @@ -53,6 +56,8 @@ internal fun ImageViewerTheme(content: @Composable () -> Unit) { onBackground = ImageviewerColors.onBackground ) ) { - content() + ProvideTextStyle(LocalTextStyle.current.copy(letterSpacing = 0.sp)) { + content() + } } }