diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Text.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Text.kt index 54a5802c7..c36d9169c 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Text.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Text.kt @@ -79,7 +79,7 @@ public fun Text( onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = JewelTheme.defaultTextStyle, ) { - val textColor = color.takeOrElse { LocalContentColor.current.takeOrElse { style.color } } + val textColor = color.takeOrElse { style.color.takeOrElse { LocalContentColor.current } } val mergedStyle = style.merge( diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Tooltip.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Tooltip.kt index 718b77ec2..4f1592182 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Tooltip.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Tooltip.kt @@ -24,6 +24,7 @@ import androidx.compose.ui.window.PopupPositionProviderAtPosition import org.jetbrains.jewel.foundation.ExperimentalJewelApi import org.jetbrains.jewel.foundation.theme.JewelTheme import org.jetbrains.jewel.foundation.theme.LocalContentColor +import org.jetbrains.jewel.foundation.theme.LocalTextStyle import org.jetbrains.jewel.foundation.theme.OverrideDarkMode import org.jetbrains.jewel.ui.component.styling.TooltipStyle import org.jetbrains.jewel.ui.theme.tooltipStyle @@ -39,7 +40,10 @@ public fun Tooltip( ) { TooltipArea( tooltip = { - CompositionLocalProvider(LocalContentColor provides style.colors.content) { + CompositionLocalProvider( + LocalContentColor provides style.colors.content, + LocalTextStyle provides LocalTextStyle.current.copy(color = style.colors.content), + ) { Box( modifier = Modifier.shadow(