From e3b77ce219080187487167cecc412f78e28b70ca Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 22 Oct 2024 11:40:19 +0200 Subject: [PATCH] Fix color of BigIcon according to Figma --- .../android/libraries/designsystem/components/BigIcon.kt | 6 +++--- .../android/libraries/designsystem/theme/ColorAliases.kt | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/BigIcon.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/BigIcon.kt index 6140373b21..5b22b534f4 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/BigIcon.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/BigIcon.kt @@ -30,12 +30,12 @@ import io.element.android.compound.theme.ElementTheme 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.bigIconDefaultBackgroundColor import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.ui.strings.CommonStrings /** * Compound component that display a big icon centered in a rounded square. + * Figma: https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=1960-553&node-type=frame&m=dev */ object BigIcon { /** @@ -84,7 +84,7 @@ object BigIcon { modifier: Modifier = Modifier, ) { val backgroundColor = when (style) { - is Style.Default -> ElementTheme.colors.bigIconDefaultBackgroundColor + is Style.Default -> ElementTheme.colors.bgSubtleSecondary Style.Alert, Style.Success -> Color.Transparent Style.AlertSolid -> ElementTheme.colors.bgCriticalSubtle Style.SuccessSolid -> ElementTheme.colors.bgSuccessSubtle @@ -100,7 +100,7 @@ object BigIcon { Style.Success, Style.SuccessSolid -> stringResource(CommonStrings.common_success) } val iconTint = when (style) { - is Style.Default -> ElementTheme.colors.iconSecondaryAlpha + is Style.Default -> ElementTheme.colors.iconSecondary Style.Alert, Style.AlertSolid -> ElementTheme.colors.iconCriticalPrimary Style.Success, Style.SuccessSolid -> ElementTheme.colors.iconSuccessPrimary } 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 86db89950c..2a46c9dea0 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 @@ -132,10 +132,6 @@ val SemanticColors.mentionPillBackground Color(0x26f4f7fa) } -@OptIn(CoreColorToken::class) -val SemanticColors.bigIconDefaultBackgroundColor - get() = if (isLight) LightColorTokens.colorAlphaGray300 else DarkColorTokens.colorAlphaGray300 - @OptIn(CoreColorToken::class) val SemanticColors.bigCheckmarkBorderColor get() = if (isLight) LightColorTokens.colorGray400 else DarkColorTokens.colorGray400 @@ -195,7 +191,6 @@ internal fun ColorAliasesPreview() = ElementPreview { "progressIndicatorTrackColor" to ElementTheme.colors.progressIndicatorTrackColor, "temporaryColorBgSpecial" to ElementTheme.colors.temporaryColorBgSpecial, "iconSuccessPrimaryBackground" to ElementTheme.colors.iconSuccessPrimaryBackground, - "bigIconBackgroundColor" to ElementTheme.colors.bigIconDefaultBackgroundColor, "bigCheckmarkBorderColor" to ElementTheme.colors.bigCheckmarkBorderColor, "highlightedMessageBackgroundColor" to ElementTheme.colors.highlightedMessageBackgroundColor, )