diff --git a/libraries/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt b/libraries/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt index ac833656588..09755d454d3 100644 --- a/libraries/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt +++ b/libraries/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt @@ -28,11 +28,13 @@ import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalContext +import io.element.android.compound.annotations.CoreColorToken import io.element.android.compound.tokens.compoundTypography import io.element.android.compound.tokens.generated.SemanticColors import io.element.android.compound.tokens.generated.TypographyTokens import io.element.android.compound.tokens.generated.compoundColorsDark import io.element.android.compound.tokens.generated.compoundColorsLight +import io.element.android.compound.tokens.generated.internal.DarkColorTokens /** * Inspired from https://medium.com/@lucasyujideveloper/54cbcbde1ace @@ -89,6 +91,7 @@ internal val LocalCompoundColors = staticCompositionLocalOf { compoundColorsLigh * @param typography the Material 3 [Typography] tokens to use. It'll use [compoundTypography] by default. * @param content the content to apply the theme to. */ +@OptIn(CoreColorToken::class) @Composable fun ElementTheme( theme: Theme = if (isSystemInDarkTheme()) Theme.Dark else Theme.Light, @@ -106,7 +109,11 @@ fun ElementTheme( val darkTheme = theme.isDark() val currentCompoundColor = when { darkTheme -> if (theme == Theme.Black) { - compoundDark.copy(bgCanvasDefault = Color.Black) + compoundDark.copy( + bgCanvasDefault = Color.Black, + // Pending design confirmation from americanrefugee/bmarty. + separatorSecondary = DarkColorTokens.colorGray400, + ) } else { compoundDark }