Fix placeholoder color issue (with a workaround)
This commit is contained in:
parent
d1f8e64fa1
commit
ebb34a0214
4 changed files with 12 additions and 3 deletions
|
|
@ -36,6 +36,7 @@ import io.element.android.libraries.designsystem.atomic.atoms.PlaceholderAtom
|
|||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||
import io.element.android.libraries.designsystem.theme.roomListPlaceholder
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +56,7 @@ internal fun RoomSummaryPlaceholderRow(
|
|||
modifier = Modifier
|
||||
.size(AvatarSize.RoomListItem.dp)
|
||||
.align(Alignment.CenterVertically)
|
||||
.background(color = ElementTheme.colors.textPlaceholder, shape = CircleShape)
|
||||
.background(color = ElementTheme.colors.roomListPlaceholder, shape = CircleShape)
|
||||
)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import androidx.compose.ui.unit.Dp
|
|||
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.roomListPlaceholder
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
|
||||
@Composable
|
||||
|
|
@ -36,7 +37,7 @@ fun PlaceholderAtom(
|
|||
width: Dp,
|
||||
height: Dp,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = ElementTheme.colors.textPlaceholder,
|
||||
color: Color = ElementTheme.colors.roomListPlaceholder,
|
||||
) {
|
||||
Box(
|
||||
modifier = modifier
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import androidx.compose.ui.graphics.Color
|
|||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
import io.element.android.libraries.theme.compound.generated.SemanticColors
|
||||
import io.element.android.libraries.theme.previews.ColorListPreview
|
||||
import kotlinx.collections.immutable.persistentMapOf
|
||||
|
||||
|
|
@ -40,6 +42,9 @@ fun MaterialTheme.roomListRoomMessageDate() = colorScheme.secondary
|
|||
@Composable
|
||||
fun MaterialTheme.roomListUnreadIndicator() = colorScheme.primary
|
||||
|
||||
val SemanticColors.roomListPlaceholder
|
||||
get() = bgSubtleSecondary
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
internal fun ColorAliasesLightPreview() = ElementPreviewLight { ContentToPreview() }
|
||||
|
|
@ -58,6 +63,7 @@ private fun ContentToPreview() {
|
|||
"roomListRoomMessage" to MaterialTheme.roomListRoomMessage(),
|
||||
"roomListRoomMessageDate" to MaterialTheme.roomListRoomMessageDate(),
|
||||
"roomListUnreadIndicator" to MaterialTheme.roomListUnreadIndicator(),
|
||||
"roomListPlaceholder" to ElementTheme.colors.roomListPlaceholder,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ internal val compoundColorsDark = SemanticColors(
|
|||
textInfoPrimary = DarkDesignTokens.colorBlue900,
|
||||
textOnSolidPrimary = DarkDesignTokens.colorThemeBg,
|
||||
bgSubtlePrimary = DarkDesignTokens.colorGray400,
|
||||
bgSubtleSecondary = DarkDesignTokens.colorBgSubtleSecondaryLevel0,
|
||||
// The value DarkDesignTokens.colorBgSubtleSecondaryLevel0 is defined to colorThemeBg, this is not correct, so override the value here until this is fixed,
|
||||
bgSubtleSecondary = DarkDesignTokens.colorGray300, // DarkDesignTokens.colorBgSubtleSecondaryLevel0
|
||||
bgCanvasDefault = DarkDesignTokens.colorBgCanvasDefaultLevel1,
|
||||
bgCanvasDisabled = DarkDesignTokens.colorGray200,
|
||||
bgActionPrimaryRest = DarkDesignTokens.colorGray1400,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue