Fix regression on some colors. Introduce a temporary color, since the color values are not in Compound. temporaryColorBgSpecial

This commit is contained in:
Benoit Marty 2023-07-11 10:15:37 +02:00 committed by Benoit Marty
parent 3e03ca4a5e
commit 88eaab0e44
4 changed files with 11 additions and 3 deletions

View file

@ -36,6 +36,7 @@ import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial
import io.element.android.libraries.theme.ElementTheme
/**
@ -59,7 +60,7 @@ fun RoundedIconAtom(
modifier = modifier
.size(size.toContainerSize())
.background(
color = ElementTheme.materialColors.surfaceVariant,
color = ElementTheme.colors.temporaryColorBgSpecial,
shape = RoundedCornerShape(size.toCornerSize())
)
) {

View file

@ -65,6 +65,10 @@ val SemanticColors.messageFromOtherBackground
Color(0xFF26282D)
}
// Temporary color, which is not in the token right now
val SemanticColors.temporaryColorBgSpecial
get() = if (isLight) Color(0xFFE4E8F0) else Color(0xFF3A4048)
@Preview
@Composable
internal fun ColorAliasesLightPreview() = ElementPreviewLight { ContentToPreview() }
@ -86,6 +90,7 @@ private fun ContentToPreview() {
"placeholderBackground" to ElementTheme.colors.placeholderBackground,
"messageFromMeBackground" to ElementTheme.colors.messageFromMeBackground,
"messageFromOtherBackground" to ElementTheme.colors.messageFromOtherBackground,
"temporaryColorBgSpecial" to ElementTheme.colors.temporaryColorBgSpecial,
)
)
}