diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerView.kt index 2e4bd92289..dcbc0695b2 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerView.kt @@ -108,7 +108,7 @@ private fun PinnedMessagesBannerRow( Icon( imageVector = CompoundIcons.PinSolid(), contentDescription = null, - tint = ElementTheme.materialColors.secondary, + tint = ElementTheme.colors.iconSecondary, modifier = Modifier .padding(horizontal = 10.dp) .size(20.dp) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt index fce2de9f30..98fc9d201b 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt @@ -121,7 +121,7 @@ private fun TextContent( .height(REACTION_EMOJI_LINE_HEIGHT.toDp()), text = text, style = ElementTheme.typography.fontBodyMdRegular, - color = ElementTheme.materialColors.primary + color = ElementTheme.colors.textPrimary ) @Composable @@ -130,7 +130,7 @@ private fun IconContent( ) = Icon( resourceId = resourceId, contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction), - tint = ElementTheme.materialColors.secondary, + tint = ElementTheme.colors.iconSecondary, modifier = Modifier .size(ADD_EMOJI_SIZE) ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt index 106d4eb532..33cf3cdfcf 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt @@ -169,7 +169,7 @@ private fun Modifier.focusedEvent( val highlightedLineColor = ElementTheme.colors.textActionAccent val gradientColors = listOf( ElementTheme.colors.highlightedMessageBackgroundColor, - ElementTheme.materialColors.background + ElementTheme.colors.bgCanvasDefault, ) val verticalOffset = focusedEventOffset.toPx() val verticalRatio = 0.7f diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAttachmentView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAttachmentView.kt index a2b55f00e5..dc40fd77fa 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAttachmentView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAttachmentView.kt @@ -77,7 +77,7 @@ private fun TimelineItemAttachmentHeaderView( modifier = Modifier .size(iconSize) .clip(CircleShape) - .background(ElementTheme.materialColors.background), + .background(ElementTheme.colors.bgCanvasDefault), contentAlignment = Alignment.Center, ) { icon() @@ -86,14 +86,14 @@ private fun TimelineItemAttachmentHeaderView( Column { Text( text = filename, - color = ElementTheme.materialColors.primary, + color = ElementTheme.colors.textPrimary, maxLines = 2, style = ElementTheme.typography.fontBodyLgRegular, overflow = TextOverflow.Ellipsis ) Text( text = fileExtensionAndSize, - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, style = ElementTheme.typography.fontBodySmRegular, maxLines = 1, overflow = TextOverflow.Ellipsis, @@ -119,7 +119,7 @@ private fun TimelineItemAttachmentCaptionView( Text( modifier = modifier, text = caption, - color = ElementTheme.materialColors.primary, + color = ElementTheme.colors.textPrimary, style = ElementTheme.typography.fontBodyLgRegular, onTextLayout = ContentAvoidingLayout.measureLastTextLine( onContentLayoutChange = onContentLayoutChange, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt index 6b28d5922b..d325b6bec5 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt @@ -38,7 +38,7 @@ fun TimelineItemAudioView( Icon( imageVector = Icons.Outlined.GraphicEq, contentDescription = null, - tint = ElementTheme.materialColors.primary, + tint = ElementTheme.colors.iconPrimary, modifier = Modifier .size(16.dp), ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt index 91260ec8aa..06e0ea6616 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt @@ -38,7 +38,7 @@ fun TimelineItemFileView( Icon( resourceId = CompoundDrawables.ic_compound_attachment, contentDescription = null, - tint = ElementTheme.materialColors.primary, + tint = ElementTheme.colors.iconPrimary, modifier = Modifier .size(16.dp) .rotate(-45f), diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt index 17785cd97c..1d357bdd2f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt @@ -91,7 +91,7 @@ fun TimelineItemVoiceView( Spacer(Modifier.width(8.dp)) Text( text = state.time, - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, style = ElementTheme.typography.fontBodySmMedium, maxLines = 1, overflow = TextOverflow.Ellipsis, diff --git a/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingView.kt b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingView.kt index 2d84a618fc..6e3878c4d2 100644 --- a/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingView.kt +++ b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingView.kt @@ -103,14 +103,14 @@ private fun OnBoardingContent(state: OnBoardingState) { ) { Text( text = stringResource(id = R.string.screen_onboarding_welcome_title), - color = ElementTheme.materialColors.primary, + color = ElementTheme.colors.textPrimary, style = ElementTheme.typography.fontHeadingLgBold, textAlign = TextAlign.Center ) Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(id = R.string.screen_onboarding_welcome_message, state.productionApplicationName), - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, style = ElementTheme.typography.fontBodyLgRegular.copy(fontSize = 17.sp), textAlign = TextAlign.Center ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt index 75d260d6a3..236d659f33 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt @@ -262,7 +262,7 @@ private fun ColumnScope.Footer( textAlign = TextAlign.Center, text = text, style = ElementTheme.typography.fontBodySmRegular, - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, ) } diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt index f196ba3c19..a0e9078530 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt @@ -162,7 +162,7 @@ private fun DefaultRoomListTopBar( // Workaround to display a very subtle bloom for avatars with very soft colors Color(0xFFF9F9F9) } else { - ElementTheme.materialColors.background + ElementTheme.colors.bgCanvasDefault }, blurSize = DpSize(avatarBloomSize, avatarBloomSize), offset = DpOffset(24.dp, 24.dp + statusBarPadding), @@ -174,7 +174,7 @@ private fun DefaultRoomListTopBar( } else { DpSize.Unspecified }, - bottomSoftEdgeColor = ElementTheme.materialColors.background, + bottomSoftEdgeColor = ElementTheme.colors.bgCanvasDefault, bottomSoftEdgeAlpha = if (displayFilters) { 1f } else { @@ -233,7 +233,7 @@ private fun DefaultRoomListTopBar( leadingIcon = { Icon( imageVector = CompoundIcons.ShareAndroid(), - tint = ElementTheme.materialColors.secondary, + tint = ElementTheme.colors.iconSecondary, contentDescription = null, ) } @@ -249,7 +249,7 @@ private fun DefaultRoomListTopBar( leadingIcon = { Icon( imageVector = CompoundIcons.ChatProblem(), - tint = ElementTheme.materialColors.secondary, + tint = ElementTheme.colors.iconSecondary, contentDescription = null, ) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt index 86537f1435..354eada12a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt @@ -33,7 +33,7 @@ fun RedIndicatorAtom( Box( modifier = modifier .size(size) - .border(borderSize, ElementTheme.materialColors.background, CircleShape) + .border(borderSize, ElementTheme.colors.bgCanvasDefault, CircleShape) .padding(borderSize / 2) .clip(CircleShape) .background(color) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ComposerAlertMolecule.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ComposerAlertMolecule.kt index 30944ead69..99d93834fe 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ComposerAlertMolecule.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ComposerAlertMolecule.kt @@ -58,7 +58,7 @@ fun ComposerAlertMolecule( ) val startColor = if (isCritical) ElementTheme.colors.bgCriticalSubtle else ElementTheme.colors.bgInfoSubtle val brush = Brush.verticalGradient( - listOf(startColor, ElementTheme.materialColors.background), + listOf(startColor, ElementTheme.colors.bgCanvasDefault), ) Box( modifier = Modifier diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/Bloom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/Bloom.kt index 5e3aebd656..b86fdd8db5 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/Bloom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/Bloom.kt @@ -477,7 +477,7 @@ internal fun BloomPreview() { } .bloom( hash = blurhash, - background = ElementTheme.materialColors.background, + background = ElementTheme.colors.bgCanvasDefault, blurSize = DpSize(430.dp, 430.dp), offset = DpOffset(24.dp, 24.dp), clipToSize = if (topAppBarHeight > 0) DpSize(430.dp, topAppBarHeight.toDp()) else DpSize.Zero, @@ -554,9 +554,9 @@ internal fun BloomInitialsPreview(@PreviewParameter(InitialsColorIntProvider::cl // Workaround to display a very subtle bloom for avatars with very soft colors Color(0xFFF9F9F9) } else { - ElementTheme.materialColors.background + ElementTheme.colors.bgCanvasDefault }, - bottomSoftEdgeColor = ElementTheme.materialColors.background, + bottomSoftEdgeColor = ElementTheme.colors.bgCanvasDefault, blurSize = DpSize(256.dp, 256.dp), ), contentAlignment = Alignment.Center diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt index 99f9f1a556..e75b7727eb 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt @@ -106,7 +106,7 @@ fun SearchBar( Icon( imageVector = CompoundIcons.Search(), contentDescription = stringResource(CommonStrings.action_search), - tint = ElementTheme.materialColors.tertiary, + tint = ElementTheme.colors.iconTertiary, ) } } @@ -138,7 +138,7 @@ fun SearchBar( Text( text = stringResource(CommonStrings.common_no_results), textAlign = TextAlign.Center, - color = ElementTheme.materialColors.tertiary, + color = ElementTheme.colors.textSecondary, modifier = Modifier.fillMaxWidth() ) } diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt index 6aea3b6dfd..55833caf59 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt @@ -77,14 +77,14 @@ private fun MatrixUserHeaderContent( maxLines = 1, style = ElementTheme.typography.fontHeadingSmMedium, overflow = TextOverflow.Ellipsis, - color = ElementTheme.materialColors.primary, + color = ElementTheme.colors.textPrimary, ) // Id if (matrixUser.displayName.isNullOrEmpty().not()) { Text( text = matrixUser.userId.value, style = ElementTheme.typography.fontBodyMdRegular, - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, maxLines = 1, overflow = TextOverflow.Ellipsis ) diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ComposerModeView.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ComposerModeView.kt index 54865499fa..1299f99463 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ComposerModeView.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ComposerModeView.kt @@ -88,7 +88,7 @@ private fun EditingModeView( Icon( imageVector = CompoundIcons.Edit(), contentDescription = null, - tint = ElementTheme.materialColors.secondary, + tint = ElementTheme.colors.iconSecondary, modifier = Modifier .padding(vertical = 8.dp) .size(16.dp), @@ -97,7 +97,7 @@ private fun EditingModeView( text = text, style = ElementTheme.typography.fontBodySmRegular, textAlign = TextAlign.Start, - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, modifier = Modifier .padding(vertical = 8.dp) .weight(1f) @@ -105,7 +105,7 @@ private fun EditingModeView( Icon( imageVector = CompoundIcons.Close(), contentDescription = stringResource(CommonStrings.action_close), - tint = ElementTheme.materialColors.secondary, + tint = ElementTheme.colors.iconSecondary, modifier = Modifier .padding(top = 8.dp, bottom = 8.dp, start = 16.dp, end = 12.dp) .size(16.dp) diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt index f7ff275e3a..bf13b8016c 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt @@ -27,9 +27,9 @@ object ElementRichTextEditorStyle { return baseStyle.copy( text = baseStyle.text.copy( color = if (hasFocus) { - ElementTheme.materialColors.primary + ElementTheme.colors.textPrimary } else { - ElementTheme.materialColors.secondary + ElementTheme.colors.textSecondary }, lineHeight = TextUnit.Unspecified, includeFontPadding = true, diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt index 4e69a1b6a6..d965a3d0d6 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt @@ -84,7 +84,7 @@ internal fun VoiceMessagePreview( Text( text = time.formatShort(), - color = ElementTheme.materialColors.secondary, + color = ElementTheme.colors.textSecondary, style = ElementTheme.typography.fontBodySmMedium, maxLines = 1, overflow = TextOverflow.Ellipsis,