From 1a009c01f73070762104f930aa97edf3c78397e7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 7 Jul 2025 15:06:33 +0200 Subject: [PATCH] Use color from Semantics. --- .../android/libraries/designsystem/theme/ColorAliases.kt | 6 ------ .../libraries/textcomposer/components/FormattingOption.kt | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt index 10541d4a8d..2db7a791fe 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt @@ -52,11 +52,6 @@ val SemanticColors.messageFromOtherBackground val SemanticColors.progressIndicatorTrackColor get() = if (isLight) LightColorTokens.colorAlphaGray500 else DarkColorTokens.colorAlphaGray500 -// This color is not present in Semantic color, so put hard-coded value for now -@OptIn(CoreColorToken::class) -val SemanticColors.iconSuccessPrimaryBackground - get() = if (isLight) LightColorTokens.colorGreen300 else DarkColorTokens.colorGreen300 - // This color is not present in Semantic color, so put hard-coded value for now @OptIn(CoreColorToken::class) val SemanticColors.bgSubtleTertiary @@ -142,7 +137,6 @@ internal fun ColorAliasesPreview() = ElementPreview { "messageFromOtherBackground" to ElementTheme.colors.messageFromOtherBackground, "progressIndicatorTrackColor" to ElementTheme.colors.progressIndicatorTrackColor, "temporaryColorBgSpecial" to ElementTheme.colors.temporaryColorBgSpecial, - "iconSuccessPrimaryBackground" to ElementTheme.colors.iconSuccessPrimaryBackground, "bigCheckmarkBorderColor" to ElementTheme.colors.bigCheckmarkBorderColor, ) ) diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt index 48ad19f812..ebeb02c9c2 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt @@ -30,7 +30,6 @@ import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon -import io.element.android.libraries.designsystem.theme.iconSuccessPrimaryBackground @Composable internal fun FormattingOption( @@ -42,7 +41,7 @@ internal fun FormattingOption( modifier: Modifier = Modifier, ) { val backgroundColor = when (state) { - FormattingOptionState.Selected -> ElementTheme.colors.iconSuccessPrimaryBackground + FormattingOptionState.Selected -> ElementTheme.colors.bgAccentSelected FormattingOptionState.Default, FormattingOptionState.Disabled -> Color.Transparent }