Use color from ElementTheme.
This commit is contained in:
parent
5cfbf7096e
commit
39cb6e03f0
18 changed files with 33 additions and 33 deletions
|
|
@ -108,7 +108,7 @@ private fun PinnedMessagesBannerRow(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.PinSolid(),
|
imageVector = CompoundIcons.PinSolid(),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(horizontal = 10.dp)
|
.padding(horizontal = 10.dp)
|
||||||
.size(20.dp)
|
.size(20.dp)
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ private fun TextContent(
|
||||||
.height(REACTION_EMOJI_LINE_HEIGHT.toDp()),
|
.height(REACTION_EMOJI_LINE_HEIGHT.toDp()),
|
||||||
text = text,
|
text = text,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = ElementTheme.materialColors.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|
@ -130,7 +130,7 @@ private fun IconContent(
|
||||||
) = Icon(
|
) = Icon(
|
||||||
resourceId = resourceId,
|
resourceId = resourceId,
|
||||||
contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction),
|
contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction),
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(ADD_EMOJI_SIZE)
|
.size(ADD_EMOJI_SIZE)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ private fun Modifier.focusedEvent(
|
||||||
val highlightedLineColor = ElementTheme.colors.textActionAccent
|
val highlightedLineColor = ElementTheme.colors.textActionAccent
|
||||||
val gradientColors = listOf(
|
val gradientColors = listOf(
|
||||||
ElementTheme.colors.highlightedMessageBackgroundColor,
|
ElementTheme.colors.highlightedMessageBackgroundColor,
|
||||||
ElementTheme.materialColors.background
|
ElementTheme.colors.bgCanvasDefault,
|
||||||
)
|
)
|
||||||
val verticalOffset = focusedEventOffset.toPx()
|
val verticalOffset = focusedEventOffset.toPx()
|
||||||
val verticalRatio = 0.7f
|
val verticalRatio = 0.7f
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ private fun TimelineItemAttachmentHeaderView(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(iconSize)
|
.size(iconSize)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(ElementTheme.materialColors.background),
|
.background(ElementTheme.colors.bgCanvasDefault),
|
||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
) {
|
) {
|
||||||
icon()
|
icon()
|
||||||
|
|
@ -86,14 +86,14 @@ private fun TimelineItemAttachmentHeaderView(
|
||||||
Column {
|
Column {
|
||||||
Text(
|
Text(
|
||||||
text = filename,
|
text = filename,
|
||||||
color = ElementTheme.materialColors.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = fileExtensionAndSize,
|
text = fileExtensionAndSize,
|
||||||
color = ElementTheme.materialColors.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
|
@ -119,7 +119,7 @@ private fun TimelineItemAttachmentCaptionView(
|
||||||
Text(
|
Text(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
text = caption,
|
text = caption,
|
||||||
color = ElementTheme.materialColors.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
onTextLayout = ContentAvoidingLayout.measureLastTextLine(
|
onTextLayout = ContentAvoidingLayout.measureLastTextLine(
|
||||||
onContentLayoutChange = onContentLayoutChange,
|
onContentLayoutChange = onContentLayoutChange,
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ fun TimelineItemAudioView(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Outlined.GraphicEq,
|
imageVector = Icons.Outlined.GraphicEq,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = ElementTheme.materialColors.primary,
|
tint = ElementTheme.colors.iconPrimary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(16.dp),
|
.size(16.dp),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ fun TimelineItemFileView(
|
||||||
Icon(
|
Icon(
|
||||||
resourceId = CompoundDrawables.ic_compound_attachment,
|
resourceId = CompoundDrawables.ic_compound_attachment,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = ElementTheme.materialColors.primary,
|
tint = ElementTheme.colors.iconPrimary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(16.dp)
|
.size(16.dp)
|
||||||
.rotate(-45f),
|
.rotate(-45f),
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ fun TimelineItemVoiceView(
|
||||||
Spacer(Modifier.width(8.dp))
|
Spacer(Modifier.width(8.dp))
|
||||||
Text(
|
Text(
|
||||||
text = state.time,
|
text = state.time,
|
||||||
color = ElementTheme.materialColors.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodySmMedium,
|
style = ElementTheme.typography.fontBodySmMedium,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
|
|
||||||
|
|
@ -103,14 +103,14 @@ private fun OnBoardingContent(state: OnBoardingState) {
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.screen_onboarding_welcome_title),
|
text = stringResource(id = R.string.screen_onboarding_welcome_title),
|
||||||
color = ElementTheme.materialColors.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontHeadingLgBold,
|
style = ElementTheme.typography.fontHeadingLgBold,
|
||||||
textAlign = TextAlign.Center
|
textAlign = TextAlign.Center
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.screen_onboarding_welcome_message, state.productionApplicationName),
|
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),
|
style = ElementTheme.typography.fontBodyLgRegular.copy(fontSize = 17.sp),
|
||||||
textAlign = TextAlign.Center
|
textAlign = TextAlign.Center
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ private fun ColumnScope.Footer(
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
text = text,
|
text = text,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
color = ElementTheme.materialColors.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ private fun DefaultRoomListTopBar(
|
||||||
// Workaround to display a very subtle bloom for avatars with very soft colors
|
// Workaround to display a very subtle bloom for avatars with very soft colors
|
||||||
Color(0xFFF9F9F9)
|
Color(0xFFF9F9F9)
|
||||||
} else {
|
} else {
|
||||||
ElementTheme.materialColors.background
|
ElementTheme.colors.bgCanvasDefault
|
||||||
},
|
},
|
||||||
blurSize = DpSize(avatarBloomSize, avatarBloomSize),
|
blurSize = DpSize(avatarBloomSize, avatarBloomSize),
|
||||||
offset = DpOffset(24.dp, 24.dp + statusBarPadding),
|
offset = DpOffset(24.dp, 24.dp + statusBarPadding),
|
||||||
|
|
@ -174,7 +174,7 @@ private fun DefaultRoomListTopBar(
|
||||||
} else {
|
} else {
|
||||||
DpSize.Unspecified
|
DpSize.Unspecified
|
||||||
},
|
},
|
||||||
bottomSoftEdgeColor = ElementTheme.materialColors.background,
|
bottomSoftEdgeColor = ElementTheme.colors.bgCanvasDefault,
|
||||||
bottomSoftEdgeAlpha = if (displayFilters) {
|
bottomSoftEdgeAlpha = if (displayFilters) {
|
||||||
1f
|
1f
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -233,7 +233,7 @@ private fun DefaultRoomListTopBar(
|
||||||
leadingIcon = {
|
leadingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.ShareAndroid(),
|
imageVector = CompoundIcons.ShareAndroid(),
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -249,7 +249,7 @@ private fun DefaultRoomListTopBar(
|
||||||
leadingIcon = {
|
leadingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.ChatProblem(),
|
imageVector = CompoundIcons.ChatProblem(),
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ fun RedIndicatorAtom(
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.size(size)
|
.size(size)
|
||||||
.border(borderSize, ElementTheme.materialColors.background, CircleShape)
|
.border(borderSize, ElementTheme.colors.bgCanvasDefault, CircleShape)
|
||||||
.padding(borderSize / 2)
|
.padding(borderSize / 2)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(color)
|
.background(color)
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ fun ComposerAlertMolecule(
|
||||||
)
|
)
|
||||||
val startColor = if (isCritical) ElementTheme.colors.bgCriticalSubtle else ElementTheme.colors.bgInfoSubtle
|
val startColor = if (isCritical) ElementTheme.colors.bgCriticalSubtle else ElementTheme.colors.bgInfoSubtle
|
||||||
val brush = Brush.verticalGradient(
|
val brush = Brush.verticalGradient(
|
||||||
listOf(startColor, ElementTheme.materialColors.background),
|
listOf(startColor, ElementTheme.colors.bgCanvasDefault),
|
||||||
)
|
)
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
|
||||||
|
|
@ -477,7 +477,7 @@ internal fun BloomPreview() {
|
||||||
}
|
}
|
||||||
.bloom(
|
.bloom(
|
||||||
hash = blurhash,
|
hash = blurhash,
|
||||||
background = ElementTheme.materialColors.background,
|
background = ElementTheme.colors.bgCanvasDefault,
|
||||||
blurSize = DpSize(430.dp, 430.dp),
|
blurSize = DpSize(430.dp, 430.dp),
|
||||||
offset = DpOffset(24.dp, 24.dp),
|
offset = DpOffset(24.dp, 24.dp),
|
||||||
clipToSize = if (topAppBarHeight > 0) DpSize(430.dp, topAppBarHeight.toDp()) else DpSize.Zero,
|
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
|
// Workaround to display a very subtle bloom for avatars with very soft colors
|
||||||
Color(0xFFF9F9F9)
|
Color(0xFFF9F9F9)
|
||||||
} else {
|
} else {
|
||||||
ElementTheme.materialColors.background
|
ElementTheme.colors.bgCanvasDefault
|
||||||
},
|
},
|
||||||
bottomSoftEdgeColor = ElementTheme.materialColors.background,
|
bottomSoftEdgeColor = ElementTheme.colors.bgCanvasDefault,
|
||||||
blurSize = DpSize(256.dp, 256.dp),
|
blurSize = DpSize(256.dp, 256.dp),
|
||||||
),
|
),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ fun <T> SearchBar(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Search(),
|
imageVector = CompoundIcons.Search(),
|
||||||
contentDescription = stringResource(CommonStrings.action_search),
|
contentDescription = stringResource(CommonStrings.action_search),
|
||||||
tint = ElementTheme.materialColors.tertiary,
|
tint = ElementTheme.colors.iconTertiary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +138,7 @@ fun <T> SearchBar(
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(CommonStrings.common_no_results),
|
text = stringResource(CommonStrings.common_no_results),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = ElementTheme.materialColors.tertiary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,14 @@ private fun MatrixUserHeaderContent(
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
style = ElementTheme.typography.fontHeadingSmMedium,
|
style = ElementTheme.typography.fontHeadingSmMedium,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = ElementTheme.materialColors.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
// Id
|
// Id
|
||||||
if (matrixUser.displayName.isNullOrEmpty().not()) {
|
if (matrixUser.displayName.isNullOrEmpty().not()) {
|
||||||
Text(
|
Text(
|
||||||
text = matrixUser.userId.value,
|
text = matrixUser.userId.value,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = ElementTheme.materialColors.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ private fun EditingModeView(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Edit(),
|
imageVector = CompoundIcons.Edit(),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
.size(16.dp),
|
.size(16.dp),
|
||||||
|
|
@ -97,7 +97,7 @@ private fun EditingModeView(
|
||||||
text = text,
|
text = text,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
color = ElementTheme.materialColors.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
|
|
@ -105,7 +105,7 @@ private fun EditingModeView(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Close(),
|
imageVector = CompoundIcons.Close(),
|
||||||
contentDescription = stringResource(CommonStrings.action_close),
|
contentDescription = stringResource(CommonStrings.action_close),
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(top = 8.dp, bottom = 8.dp, start = 16.dp, end = 12.dp)
|
.padding(top = 8.dp, bottom = 8.dp, start = 16.dp, end = 12.dp)
|
||||||
.size(16.dp)
|
.size(16.dp)
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ object ElementRichTextEditorStyle {
|
||||||
return baseStyle.copy(
|
return baseStyle.copy(
|
||||||
text = baseStyle.text.copy(
|
text = baseStyle.text.copy(
|
||||||
color = if (hasFocus) {
|
color = if (hasFocus) {
|
||||||
ElementTheme.materialColors.primary
|
ElementTheme.colors.textPrimary
|
||||||
} else {
|
} else {
|
||||||
ElementTheme.materialColors.secondary
|
ElementTheme.colors.textSecondary
|
||||||
},
|
},
|
||||||
lineHeight = TextUnit.Unspecified,
|
lineHeight = TextUnit.Unspecified,
|
||||||
includeFontPadding = true,
|
includeFontPadding = true,
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ internal fun VoiceMessagePreview(
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = time.formatShort(),
|
text = time.formatShort(),
|
||||||
color = ElementTheme.materialColors.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodySmMedium,
|
style = ElementTheme.typography.fontBodySmMedium,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue