diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt index 04eeb90056..34d53acf78 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt @@ -14,10 +14,13 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material.Divider +import androidx.compose.material.LocalTextStyle import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.ComposeView +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -81,8 +84,8 @@ class MessageDetailActivity: PassphraseRequiredActionBarActivity() { TitledText("Duration:", "N/A"), ) - val sent = TitledText("Sent:", "6:12 AM Tue, 09/08/2022 ") - val received = TitledText("Received:", "6:12 AM Tue, 09/08/2022 ") + val sent = TitledText("Sent:", "6:12 AM Tue, 09/08/2022") + val received = TitledText("Received:", "6:12 AM Tue, 09/08/2022") val user = TitledText("Connor", "d4f1g54sdf5g1d5f4g65ds4564df65f4g65d54gdfsg") AppTheme { @@ -109,7 +112,7 @@ class MessageDetailActivity: PassphraseRequiredActionBarActivity() { .width(60.dp) .height(60.dp)) Column { - titledText(user) + titledText(user, valueStyle = LocalTextStyle.current.copy(fontFamily = FontFamily.Monospace)) } } } @@ -134,10 +137,10 @@ class MessageDetailActivity: PassphraseRequiredActionBarActivity() { } @Composable - fun titledText(titledText: TitledText, modifier: Modifier = Modifier) { + fun titledText(titledText: TitledText, modifier: Modifier = Modifier, valueStyle: TextStyle = LocalTextStyle.current) { Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(4.dp)) { Title(titledText.title) - Text(titledText.value) + Text(titledText.value, style = valueStyle) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt index b5d78e99d2..046ba4635a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt @@ -10,7 +10,9 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.ButtonColors +import androidx.compose.material.Card import androidx.compose.material.Icon +import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.TextButton import androidx.compose.runtime.Composable @@ -55,13 +57,15 @@ fun Cell(content: @Composable () -> Unit) { @Composable fun CellWithPadding(padding: Dp = 24.dp, content: @Composable () -> Unit) { - androidx.compose.material.Card( + Card( shape = RoundedCornerShape(16.dp), elevation = 0.dp, modifier = Modifier .wrapContentHeight() .fillMaxWidth() .padding(horizontal = 32.dp), - backgroundColor = LocalExtraColors.current.settingsBackground + backgroundColor = LocalExtraColors.current.settingsBackground, + // probably wrong + contentColor = MaterialTheme.colors.onSurface ) { Box(Modifier.padding(padding)) { content() } } -} \ No newline at end of file +}