diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/AreaBox.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/AreaBox.kt index 637f2a5..b3356a5 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/AreaBox.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/AreaBox.kt @@ -218,7 +218,10 @@ object AreaBoxDefaults { */ @Composable fun colors( - backgroundColor: Color = AreaBoxProperties.BackgroundColor.toColor(), + backgroundColor: Color = when (LocalInAreaBox.current) { + true -> AreaBoxProperties.InnerBackgroundColor + else -> AreaBoxProperties.BackgroundColor + }.toColor(), borderColor: Color = AreaBoxProperties.BorderColor.toColor() ) = AreaBoxColors( backgroundColor = backgroundColor, @@ -268,6 +271,7 @@ object AreaBoxDefaults { @Stable internal object AreaBoxProperties { val BackgroundColor = ColorsDescriptor.ForegroundPrimary + val InnerBackgroundColor = ColorsDescriptor.ForegroundSecondary val BorderColor = ColorsDescriptor.TextPrimary val Padding = PaddingDescriptor(SizesDescriptor.SpacingPrimary) val Shape = ShapesDescriptor.Primary diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/ItemBox.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/ItemBox.kt index 4ad7b0e..49c3656 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/ItemBox.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/ItemBox.kt @@ -247,7 +247,7 @@ object ItemBoxDefaults { */ @Composable fun colors( - backgroundColor: Color = ItemBoxProperties.BackgroundColor.toColor(), + backgroundColor: Color = AreaBoxDefaults.colors().backgroundColor, titleTextColor: Color = ItemBoxProperties.TitleTextColor.toColor(), subtitleTextColor: Color = ItemBoxProperties.SubtitleTextColor.toColor(), arrowIconTint: Color = ItemBoxProperties.ArrowIconTint.toColor(), @@ -290,7 +290,6 @@ object ItemBoxDefaults { @Stable internal object ItemBoxProperties { - val BackgroundColor = AreaBoxProperties.BackgroundColor val TitleTextColor = ColorsDescriptor.TextPrimary val SubtitleTextColor = ColorsDescriptor.TextSecondary val ArrowIconTint = ColorsDescriptor.TextSecondary