Skip to content

Commit 88eaab0

Browse files
committed
Fix regression on some colors. Introduce a temporary color, since the color values are not in Compound. temporaryColorBgSpecial
1 parent 3e03ca4 commit 88eaab0

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInView.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import io.element.android.libraries.designsystem.theme.components.Button
5656
import io.element.android.libraries.designsystem.theme.components.Icon
5757
import io.element.android.libraries.designsystem.theme.components.Text
5858
import io.element.android.libraries.designsystem.theme.components.TextButton
59+
import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial
5960
import io.element.android.libraries.designsystem.utils.LogCompositions
6061
import io.element.android.libraries.theme.ElementTheme
6162
import io.element.android.libraries.ui.strings.CommonStrings
@@ -159,7 +160,7 @@ private fun AnalyticsOptInContentRow(
159160
modifier = modifier
160161
.fillMaxWidth()
161162
.background(
162-
color = ElementTheme.materialColors.surfaceVariant,
163+
color = ElementTheme.colors.temporaryColorBgSpecial,
163164
shape = bgShape,
164165
)
165166
.padding(vertical = 12.dp, horizontal = 20.dp),

libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RoundedIconAtom.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import androidx.compose.ui.unit.dp
3636
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
3737
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
3838
import io.element.android.libraries.designsystem.theme.components.Icon
39+
import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial
3940
import io.element.android.libraries.theme.ElementTheme
4041

4142
/**
@@ -59,7 +60,7 @@ fun RoundedIconAtom(
5960
modifier = modifier
6061
.size(size.toContainerSize())
6162
.background(
62-
color = ElementTheme.materialColors.surfaceVariant,
63+
color = ElementTheme.colors.temporaryColorBgSpecial,
6364
shape = RoundedCornerShape(size.toCornerSize())
6465
)
6566
) {

libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ val SemanticColors.messageFromOtherBackground
6565
Color(0xFF26282D)
6666
}
6767

68+
// Temporary color, which is not in the token right now
69+
val SemanticColors.temporaryColorBgSpecial
70+
get() = if (isLight) Color(0xFFE4E8F0) else Color(0xFF3A4048)
71+
6872
@Preview
6973
@Composable
7074
internal fun ColorAliasesLightPreview() = ElementPreviewLight { ContentToPreview() }
@@ -86,6 +90,7 @@ private fun ContentToPreview() {
8690
"placeholderBackground" to ElementTheme.colors.placeholderBackground,
8791
"messageFromMeBackground" to ElementTheme.colors.messageFromMeBackground,
8892
"messageFromOtherBackground" to ElementTheme.colors.messageFromOtherBackground,
93+
"temporaryColorBgSpecial" to ElementTheme.colors.temporaryColorBgSpecial,
8994
)
9095
)
9196
}

libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/UnsavedAvatar.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import io.element.android.libraries.designsystem.preview.ElementPreviewDark
4040
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
4141
import io.element.android.libraries.designsystem.preview.debugPlaceholderBackground
4242
import io.element.android.libraries.designsystem.theme.components.Icon
43+
import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial
4344
import io.element.android.libraries.theme.ElementTheme
4445

4546
/**
@@ -69,7 +70,7 @@ fun UnsavedAvatar(
6970
contentDescription = null,
7071
)
7172
} else {
72-
Box(modifier = commonModifier.background(ElementTheme.materialColors.surfaceVariant)) {
73+
Box(modifier = commonModifier.background(ElementTheme.colors.temporaryColorBgSpecial)) {
7374
Icon(
7475
imageVector = Icons.Outlined.AddAPhoto,
7576
contentDescription = "",

0 commit comments

Comments
 (0)