Use color from Semantics.
This commit is contained in:
parent
1a009c01f7
commit
9bec4ce711
2 changed files with 2 additions and 20 deletions
|
|
@ -70,27 +70,9 @@ val SemanticColors.pinDigitBg
|
||||||
val SemanticColors.currentUserMentionPillText
|
val SemanticColors.currentUserMentionPillText
|
||||||
get() = if (isLight) LightColorTokens.colorGreen1100 else DarkColorTokens.colorGreen1100
|
get() = if (isLight) LightColorTokens.colorGreen1100 else DarkColorTokens.colorGreen1100
|
||||||
|
|
||||||
val SemanticColors.currentUserMentionPillBackground
|
|
||||||
get() = if (isLight) {
|
|
||||||
// We want LightDesignTokens.colorGreenAlpha400
|
|
||||||
Color(0x3b07b661)
|
|
||||||
} else {
|
|
||||||
// We want DarkDesignTokens.colorGreenAlpha500
|
|
||||||
Color(0xff003d29)
|
|
||||||
}
|
|
||||||
|
|
||||||
val SemanticColors.mentionPillText
|
val SemanticColors.mentionPillText
|
||||||
get() = textPrimary
|
get() = textPrimary
|
||||||
|
|
||||||
val SemanticColors.mentionPillBackground
|
|
||||||
get() = if (isLight) {
|
|
||||||
// We want LightDesignTokens.colorGray400
|
|
||||||
Color(0x1f052e61)
|
|
||||||
} else {
|
|
||||||
// We want DarkDesignTokens.colorGray500
|
|
||||||
Color(0x26f4f7fa)
|
|
||||||
}
|
|
||||||
|
|
||||||
@OptIn(CoreColorToken::class)
|
@OptIn(CoreColorToken::class)
|
||||||
val SemanticColors.bigCheckmarkBorderColor
|
val SemanticColors.bigCheckmarkBorderColor
|
||||||
get() = if (isLight) LightColorTokens.colorGray400 else DarkColorTokens.colorGray400
|
get() = if (isLight) LightColorTokens.colorGray400 else DarkColorTokens.colorGray400
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,9 @@ class MentionSpanTheme(val currentUserId: UserId) {
|
||||||
@Composable
|
@Composable
|
||||||
fun updateStyles() {
|
fun updateStyles() {
|
||||||
currentUserTextColor = ElementTheme.colors.currentUserMentionPillText.toArgb()
|
currentUserTextColor = ElementTheme.colors.currentUserMentionPillText.toArgb()
|
||||||
currentUserBackgroundColor = ElementTheme.colors.currentUserMentionPillBackground.toArgb()
|
currentUserBackgroundColor = ElementTheme.colors.bgBadgeAccent.toArgb()
|
||||||
otherTextColor = ElementTheme.colors.mentionPillText.toArgb()
|
otherTextColor = ElementTheme.colors.mentionPillText.toArgb()
|
||||||
otherBackgroundColor = ElementTheme.colors.mentionPillBackground.toArgb()
|
otherBackgroundColor = ElementTheme.colors.bgBadgeDefault.toArgb()
|
||||||
|
|
||||||
typeface.value = ElementTheme.typography.fontBodyLgMedium.rememberTypeface().value
|
typeface.value = ElementTheme.typography.fontBodyLgMedium.rememberTypeface().value
|
||||||
val density = LocalDensity.current
|
val density = LocalDensity.current
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue