From e4fba862d12c367e7d78ed03ab41608b6b2f0999 Mon Sep 17 00:00:00 2001 From: eldcn Date: Mon, 9 Dec 2024 01:19:02 +0100 Subject: [PATCH] Update color keys of user name and email in Account dialog (#148) --- .../navigation/components/AccountDialog.kt | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/edu/stanford/bdh/engagehf/navigation/components/AccountDialog.kt b/app/src/main/kotlin/edu/stanford/bdh/engagehf/navigation/components/AccountDialog.kt index c41a2c154..c1f9ce44e 100644 --- a/app/src/main/kotlin/edu/stanford/bdh/engagehf/navigation/components/AccountDialog.kt +++ b/app/src/main/kotlin/edu/stanford/bdh/engagehf/navigation/components/AccountDialog.kt @@ -34,15 +34,19 @@ import edu.stanford.bdh.engagehf.navigation.screens.AccountUiState import edu.stanford.bdh.engagehf.navigation.screens.Action import edu.stanford.spezi.core.design.component.VerticalSpacer import edu.stanford.spezi.core.design.theme.Colors +import edu.stanford.spezi.core.design.theme.Colors.onBackground import edu.stanford.spezi.core.design.theme.Colors.onPrimary import edu.stanford.spezi.core.design.theme.Colors.primary +import edu.stanford.spezi.core.design.theme.Colors.secondary import edu.stanford.spezi.core.design.theme.Colors.surface import edu.stanford.spezi.core.design.theme.Sizes import edu.stanford.spezi.core.design.theme.Spacings import edu.stanford.spezi.core.design.theme.SpeziTheme import edu.stanford.spezi.core.design.theme.TextStyles import edu.stanford.spezi.core.design.theme.TextStyles.bodyMedium +import edu.stanford.spezi.core.design.theme.TextStyles.bodySmall import edu.stanford.spezi.core.design.theme.TextStyles.headlineMedium +import edu.stanford.spezi.core.design.theme.TextStyles.headlineSmall import edu.stanford.spezi.core.design.theme.ThemePreviews import edu.stanford.spezi.core.design.theme.lighten @@ -61,10 +65,10 @@ fun AccountDialog(accountUiState: AccountUiState, onAction: (Action) -> Unit) { color = surface.lighten(), modifier = Modifier .fillMaxWidth() - .padding(Spacings.medium) + .padding(Spacings.small) ) { Column( - modifier = Modifier.padding(Spacings.medium), + modifier = Modifier.padding(Spacings.small), horizontalAlignment = Alignment.CenterHorizontally, ) { Row { @@ -80,12 +84,14 @@ fun AccountDialog(accountUiState: AccountUiState, onAction: (Action) -> Unit) { Icon( imageVector = Icons.Default.Close, contentDescription = stringResource(R.string.close_dialog_content_description), - tint = MaterialTheme.colorScheme.primary, + tint = primary, modifier = Modifier.size(Sizes.Icon.small) ) } Text( - text = stringResource(R.string.account), style = TextStyles.titleMedium, + text = stringResource(R.string.account), + style = TextStyles.titleMedium, + color = onBackground, modifier = Modifier.align( Alignment.Center ) @@ -124,10 +130,18 @@ fun AccountDialog(accountUiState: AccountUiState, onAction: (Action) -> Unit) { Column { VerticalSpacer() accountUiState.name?.let { - Text(text = it, style = headlineMedium) + Text( + text = it, + color = onBackground, + style = headlineSmall + ) VerticalSpacer(height = Spacings.small) } - Text(text = accountUiState.email, style = bodyMedium) + Text( + text = accountUiState.email, + color = secondary, + style = bodySmall + ) VerticalSpacer() } }