diff --git a/auth/src/main/java/org/openedx/auth/presentation/logistration/LogistrationFragment.kt b/auth/src/main/java/org/openedx/auth/presentation/logistration/LogistrationFragment.kt index eb63bbc19..fce279e86 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/logistration/LogistrationFragment.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/logistration/LogistrationFragment.kt @@ -33,6 +33,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.testTagsAsResourceId import androidx.compose.ui.text.input.TextFieldValue +import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Devices import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -143,7 +144,6 @@ private fun LogistrationScreen( LogistrationLogoView() Text( text = stringResource(id = R.string.pre_auth_title), - color = MaterialTheme.appColors.textPrimary, style = MaterialTheme.appTypography.headlineSmall, modifier = Modifier .testTag("txt_screen_title") @@ -189,7 +189,8 @@ private fun LogistrationScreen( }, text = stringResource(id = R.string.pre_auth_explore_all_courses), color = MaterialTheme.appColors.primary, - style = MaterialTheme.appTypography.labelLarge + style = MaterialTheme.appTypography.labelLarge, + textDecoration = TextDecoration.Underline ) Spacer(modifier = Modifier.weight(1f)) diff --git a/auth/src/main/java/org/openedx/auth/presentation/signin/compose/SignInView.kt b/auth/src/main/java/org/openedx/auth/presentation/signin/compose/SignInView.kt index c40884d6f..d877fc6e6 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/signin/compose/SignInView.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/signin/compose/SignInView.kt @@ -63,7 +63,7 @@ import org.openedx.core.extension.TextConverter import org.openedx.core.ui.BackBtn import org.openedx.core.ui.HandleUIMessage import org.openedx.core.ui.HyperlinkText -import org.openedx.core.ui.OpenEdXButton +import org.openedx.core.ui.OpenEdXSecondaryButton import org.openedx.core.ui.WindowSize import org.openedx.core.ui.WindowType import org.openedx.core.ui.displayCutoutForLandscape @@ -272,8 +272,8 @@ private fun AuthForm( if (state.showProgress) { CircularProgressIndicator(color = MaterialTheme.appColors.primary) } else { - OpenEdXButton( - width = buttonWidth.testTag("btn_sign_in"), + OpenEdXSecondaryButton( + modifier = buttonWidth.testTag("btn_sign_in"), text = stringResource(id = coreR.string.core_sign_in), onClick = { onEvent(AuthEvent.SignIn(login = login, password = password)) diff --git a/auth/src/main/java/org/openedx/auth/presentation/signup/compose/SignUpView.kt b/auth/src/main/java/org/openedx/auth/presentation/signup/compose/SignUpView.kt index 2852ab5fe..e8771e11b 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/signup/compose/SignUpView.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/signup/compose/SignUpView.kt @@ -72,7 +72,7 @@ import org.openedx.core.domain.model.RegistrationField import org.openedx.core.domain.model.RegistrationFieldType import org.openedx.core.ui.BackBtn import org.openedx.core.ui.HandleUIMessage -import org.openedx.core.ui.OpenEdXButton +import org.openedx.core.ui.OpenEdXSecondaryButton import org.openedx.core.ui.SheetContent import org.openedx.core.ui.WindowSize import org.openedx.core.ui.WindowType @@ -434,8 +434,8 @@ internal fun SignUpView( CircularProgressIndicator(color = MaterialTheme.appColors.primary) } } else { - OpenEdXButton( - width = buttonWidth.testTag("btn_create_account"), + OpenEdXSecondaryButton( + modifier = buttonWidth.testTag("btn_create_account"), text = stringResource(id = R.string.auth_create_account), onClick = { showErrorMap.clear() diff --git a/auth/src/main/java/org/openedx/auth/presentation/ui/AuthUI.kt b/auth/src/main/java/org/openedx/auth/presentation/ui/AuthUI.kt index 4f98ea50c..f6c110bd3 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/ui/AuthUI.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/ui/AuthUI.kt @@ -44,6 +44,7 @@ import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.VisualTransformation +import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.openedx.auth.R @@ -171,6 +172,7 @@ fun OptionalFields( fullText = linkedText.text, hyperLinks = linkedText.links, linkTextColor = MaterialTheme.appColors.primary, + linkTextDecoration = TextDecoration.Underline, action = { hyperLinkAction?.invoke(linkedText.links, it) }, @@ -298,11 +300,11 @@ fun InputRegistrationField( } val isSingleLine = registrationField.type != RegistrationFieldType.TEXTAREA val helperTextColor = if (registrationField.errorInstructions.isEmpty()) { - MaterialTheme.appColors.textSecondary + MaterialTheme.appColors.textFieldHint } else if (isErrorShown) { MaterialTheme.appColors.error } else { - MaterialTheme.appColors.textSecondary + MaterialTheme.appColors.textFieldHint } val helperText = if (registrationField.errorInstructions.isEmpty()) { registrationField.instructions @@ -374,11 +376,11 @@ fun SelectableRegisterField( onClick: (String, List) -> Unit ) { val helperTextColor = if (registrationField.errorInstructions.isEmpty()) { - MaterialTheme.appColors.textSecondary + MaterialTheme.appColors.textFieldHint } else if (isErrorShown) { MaterialTheme.appColors.error } else { - MaterialTheme.appColors.textSecondary + MaterialTheme.appColors.textFieldHint } val helperText = if (registrationField.errorInstructions.isEmpty()) { registrationField.instructions diff --git a/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt b/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt index c9d73662b..08659894c 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt @@ -46,7 +46,7 @@ internal fun SocialAuthView( .padding(top = 24.dp) .fillMaxWidth(), backgroundColor = MaterialTheme.appColors.background, - borderColor = MaterialTheme.appColors.primary, + borderColor = MaterialTheme.appColors.textFieldBorder, textColor = Color.Unspecified, onClick = { onEvent(AuthType.GOOGLE) @@ -87,13 +87,13 @@ internal fun SocialAuthView( Icon( painter = painterResource(id = R.drawable.ic_auth_facebook), contentDescription = null, - tint = MaterialTheme.appColors.buttonText, + tint = MaterialTheme.appColors.onSecondary, ) Text( modifier = Modifier .testTag("txt_facebook_auth") .padding(start = 10.dp), - color = MaterialTheme.appColors.buttonText, + color = MaterialTheme.appColors.onSecondary, text = stringResource(id = stringRes) ) } @@ -125,7 +125,7 @@ internal fun SocialAuthView( modifier = Modifier .testTag("txt_microsoft_auth") .padding(start = 10.dp), - color = MaterialTheme.appColors.buttonText, + color = MaterialTheme.appColors.onSecondary, text = stringResource(id = stringRes) ) } diff --git a/core/src/main/java/org/openedx/core/config/ProgramConfig.kt b/core/src/main/java/org/openedx/core/config/ProgramConfig.kt index 55714dadc..c553f8997 100644 --- a/core/src/main/java/org/openedx/core/config/ProgramConfig.kt +++ b/core/src/main/java/org/openedx/core/config/ProgramConfig.kt @@ -14,7 +14,7 @@ data class ProgramConfig( } data class ProgramWebViewConfig( - @SerializedName("PROGRAM_URL") + @SerializedName("BASE_URL") val programUrl: String = "", @SerializedName("PROGRAM_DETAIL_URL_TEMPLATE") val programDetailUrlTemplate: String = "", diff --git a/core/src/main/java/org/openedx/core/presentation/global/app_upgrade/AppUpdateUI.kt b/core/src/main/java/org/openedx/core/presentation/global/app_upgrade/AppUpdateUI.kt index f0502b49d..9a32b4123 100644 --- a/core/src/main/java/org/openedx/core/presentation/global/app_upgrade/AppUpdateUI.kt +++ b/core/src/main/java/org/openedx/core/presentation/global/app_upgrade/AppUpdateUI.kt @@ -275,7 +275,7 @@ fun TransparentTextButton( ) { Text( modifier = Modifier.testTag("txt_secondary"), - color = MaterialTheme.appColors.textAccent, + color = MaterialTheme.appColors.textPrimary, style = MaterialTheme.appTypography.labelLarge, text = text ) @@ -292,7 +292,7 @@ fun DefaultTextButton( .testTag("btn_primary") .height(42.dp), colors = ButtonDefaults.buttonColors( - backgroundColor = MaterialTheme.appColors.buttonBackground + backgroundColor = MaterialTheme.appColors.textPrimary ), elevation = null, shape = MaterialTheme.appShapes.navigationButtonShape, diff --git a/core/src/main/java/org/openedx/core/presentation/settings/VideoQualityFragment.kt b/core/src/main/java/org/openedx/core/presentation/settings/VideoQualityFragment.kt index e26d882eb..f1c92f4c8 100644 --- a/core/src/main/java/org/openedx/core/presentation/settings/VideoQualityFragment.kt +++ b/core/src/main/java/org/openedx/core/presentation/settings/VideoQualityFragment.kt @@ -233,7 +233,7 @@ private fun QualityOption( Text( modifier = Modifier.testTag("txt_video_quality_description_${title.tagId()}"), text = description, - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textPrimary, style = MaterialTheme.appTypography.labelMedium ) } diff --git a/core/src/main/java/org/openedx/core/ui/ComposeCommon.kt b/core/src/main/java/org/openedx/core/ui/ComposeCommon.kt index afa8d7b12..da10309e9 100644 --- a/core/src/main/java/org/openedx/core/ui/ComposeCommon.kt +++ b/core/src/main/java/org/openedx/core/ui/ComposeCommon.kt @@ -235,7 +235,7 @@ fun SearchBar( .testTag("txt_search_placeholder") .fillMaxWidth(), text = label, - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldHint, style = MaterialTheme.appTypography.bodyMedium ) }, @@ -325,7 +325,7 @@ fun SearchBarStateless( Text( modifier = Modifier.fillMaxWidth(), text = label, - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.bodyMedium ) }, @@ -1076,12 +1076,32 @@ fun OfflineModeDialog( } } +@Composable +fun OpenEdXSecondaryButton( + modifier: Modifier = Modifier.fillMaxWidth(), + text: String = "", + onClick: () -> Unit, + enabled: Boolean = true, + content: (@Composable RowScope.() -> Unit)? = null +) { + OpenEdXButton( + width = modifier, + text = text, + onClick = onClick, + enabled = enabled, + textColor = MaterialTheme.appColors.onSecondary, + backgroundColor = MaterialTheme.appColors.secondary, + content = content + ) +} + @Composable fun OpenEdXButton( width: Modifier = Modifier.fillMaxWidth(), text: String = "", onClick: () -> Unit, enabled: Boolean = true, + textColor: Color = MaterialTheme.appColors.buttonText, backgroundColor: Color = MaterialTheme.appColors.buttonBackground, content: (@Composable RowScope.() -> Unit)? = null ) { @@ -1101,7 +1121,7 @@ fun OpenEdXButton( Text( modifier = Modifier.testTag("txt_${text.tagId()}"), text = text, - color = MaterialTheme.appColors.buttonText, + color = textColor, style = MaterialTheme.appTypography.labelLarge ) } else { @@ -1110,6 +1130,26 @@ fun OpenEdXButton( } } +@Composable +fun OpenEdXSecondaryOutlinedButton( + modifier: Modifier = Modifier.fillMaxWidth(), + text: String = "", + onClick: () -> Unit, + enabled: Boolean = true, + content: (@Composable RowScope.() -> Unit)? = null +) { + OpenEdXOutlinedButton( + modifier = modifier, + text = text, + onClick = onClick, + enabled = enabled, + textColor = MaterialTheme.appColors.secondary, + backgroundColor = MaterialTheme.appColors.onSecondary, + borderColor = MaterialTheme.appColors.buttonBorder, + content = content + ) +} + @Composable fun OpenEdXOutlinedButton( modifier: Modifier = Modifier.fillMaxWidth(), @@ -1118,6 +1158,7 @@ fun OpenEdXOutlinedButton( textColor: Color, text: String = "", onClick: () -> Unit, + enabled: Boolean = true, content: (@Composable RowScope.() -> Unit)? = null ) { OutlinedButton( @@ -1126,6 +1167,7 @@ fun OpenEdXOutlinedButton( .then(modifier) .height(42.dp), onClick = onClick, + enabled = enabled, border = BorderStroke(1.dp, borderColor), shape = MaterialTheme.appShapes.buttonShape, colors = ButtonDefaults.outlinedButtonColors(backgroundColor = backgroundColor) @@ -1186,8 +1228,8 @@ fun ConnectionErrorView( textAlign = TextAlign.Center ) Spacer(Modifier.height(16.dp)) - OpenEdXButton( - width = Modifier + OpenEdXSecondaryButton( + modifier = Modifier .widthIn(Dp.Unspecified, 162.dp), text = stringResource(id = R.string.core_reload), onClick = onReloadClick @@ -1201,8 +1243,8 @@ fun AuthButtonsPanel( onSignInClick: () -> Unit ) { Row { - OpenEdXButton( - width = Modifier + OpenEdXSecondaryButton( + modifier = Modifier .testTag("btn_register") .width(0.dp) .weight(1f), @@ -1210,15 +1252,13 @@ fun AuthButtonsPanel( onClick = { onRegisterClick() } ) - OpenEdXOutlinedButton( + OpenEdXSecondaryOutlinedButton( modifier = Modifier .testTag("btn_sign_in") .width(100.dp) .padding(start = 16.dp), text = stringResource(id = R.string.core_sign_in), - onClick = { onSignInClick() }, - borderColor = MaterialTheme.appColors.textFieldBorder, - textColor = MaterialTheme.appColors.primary + onClick = { onSignInClick() } ) } } diff --git a/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt b/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt index 3a540d9fa..32ca9130b 100644 --- a/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt +++ b/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt @@ -30,6 +30,9 @@ data class AppColors( val bottomSheetToggle: Color, val warning: Color, val info: Color, + val onWarning: Color, + val onInfo: Color, + val buttonBorder: Color, val rateStars: Color, val inactiveButtonBackground: Color, diff --git a/core/src/main/java/org/openedx/core/ui/theme/Theme.kt b/core/src/main/java/org/openedx/core/ui/theme/Theme.kt index e5e7a00d3..7f32e2815 100644 --- a/core/src/main/java/org/openedx/core/ui/theme/Theme.kt +++ b/core/src/main/java/org/openedx/core/ui/theme/Theme.kt @@ -50,6 +50,9 @@ private val DarkColorPalette = AppColors( warning = dark_warning, info = dark_info, + onWarning = dark_onWarning, + onInfo = dark_onInfo, + buttonBorder = dark_button_border, rateStars = dark_rate_stars, inactiveButtonBackground = dark_inactive_button_background, @@ -112,6 +115,9 @@ private val LightColorPalette = AppColors( warning = light_warning, info = light_info, + onWarning = light_onWarning, + onInfo = light_onInfo, + buttonBorder = light_button_border, rateStars = light_rate_stars, inactiveButtonBackground = light_inactive_button_background, diff --git a/core/src/main/java/org/openedx/core/ui/theme/Type.kt b/core/src/main/java/org/openedx/core/ui/theme/Type.kt index edd2afcc7..0160196f9 100644 --- a/core/src/main/java/org/openedx/core/ui/theme/Type.kt +++ b/core/src/main/java/org/openedx/core/ui/theme/Type.kt @@ -34,7 +34,6 @@ data class AppTypography( val fontFamily = FontFamily( Font(R.font.regular, FontWeight.Black, FontStyle.Normal), Font(R.font.bold, FontWeight.Bold, FontStyle.Normal), - Font(R.font.bold, FontWeight.Bold, FontStyle.Normal), Font(R.font.extra_light, FontWeight.Light, FontStyle.Normal), Font(R.font.light, FontWeight.Light, FontStyle.Normal), Font(R.font.medium, FontWeight.Medium, FontStyle.Normal), @@ -43,7 +42,6 @@ val fontFamily = FontFamily( Font(R.font.thin, FontWeight.Thin, FontStyle.Normal), ) - internal val LocalTypography = staticCompositionLocalOf { AppTypography( displayLarge = TextStyle( diff --git a/core/src/openedx/org/openedx/core/ui/theme/Colors.kt b/core/src/openedx/org/openedx/core/ui/theme/Colors.kt index 29f09b21b..795dc1ae5 100644 --- a/core/src/openedx/org/openedx/core/ui/theme/Colors.kt +++ b/core/src/openedx/org/openedx/core/ui/theme/Colors.kt @@ -10,10 +10,12 @@ val light_background = Color.White val light_surface = Color(0xFFF7F7F8) val light_error = Color(0xFFFF3D71) val light_onPrimary = Color.White -val light_onSecondary = Color.Black +val light_onSecondary = Color.White val light_onBackground = Color.Black val light_onSurface = Color.Black val light_onError = Color.White +val light_onWarning = Color.White +val light_onInfo = Color.White val light_text_primary = Color(0xFF212121) val light_text_primary_variant = Color(0xFF3D4964) val light_text_secondary = Color(0xFFB3B3B3) @@ -25,6 +27,7 @@ val light_text_field_border = Color(0xFF97A5BB) val light_text_field_text = Color(0xFF3D4964) val light_text_field_hint = Color(0xFF97A5BB) val light_button_background = Color(0xFF3C68FF) +val light_button_border = Color(0xFF97A5BB) val light_button_secondary_background = Color(0xFF79889F) val light_button_text = Color.White val light_card_view_background = Color(0xFFF9FAFB) @@ -59,7 +62,7 @@ val dark_background = Color(0xFF19212F) val dark_surface = Color(0xFF273346) val dark_error = Color(0xFFFF3D71) val dark_onPrimary = Color.Black -val dark_onSecondary = Color.Black +val dark_onSecondary = Color.White val dark_onBackground = Color.White val dark_onSurface = Color.White val dark_onError = Color.Black @@ -74,6 +77,7 @@ val dark_text_field_border = Color(0xFF4E5A70) val dark_text_field_text = Color.White val dark_text_field_hint = Color(0xFF79889F) val dark_button_background = Color(0xFF5478F9) +val dark_button_border = Color(0xFF4E5A70) val dark_button_secondary_background = Color(0xFF79889F) val dark_button_text = Color.White val dark_card_view_background = Color(0xFF273346) @@ -82,7 +86,9 @@ val dark_divider = Color(0xFF4E5A70) val dark_certificate_foreground = Color(0xD92EB865) val dark_bottom_sheet_toggle = Color(0xFF4E5A70) val dark_warning = Color(0xFFFFC248) +val dark_onWarning = Color.White val dark_info = Color(0xFF0095FF) +val dark_onInfo = Color.White val dark_rate_stars = Color(0xFFFFC94D) val dark_inactive_button_background = Color(0xFFCCD4E0) val dark_inactive_button_text = Color(0xFF3D4964) diff --git a/course/src/main/java/org/openedx/course/presentation/ui/CourseVideosUI.kt b/course/src/main/java/org/openedx/course/presentation/ui/CourseVideosUI.kt index 8d5bc7172..d767ac7c2 100644 --- a/course/src/main/java/org/openedx/course/presentation/ui/CourseVideosUI.kt +++ b/course/src/main/java/org/openedx/course/presentation/ui/CourseVideosUI.kt @@ -562,7 +562,7 @@ private fun AllVideosDownloadItem( Spacer(modifier = Modifier.height(2.dp)) Text( text = downloadVideoSubTitle, - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.labelMedium ) } @@ -635,7 +635,7 @@ private fun AllVideosDownloadItem( Spacer(modifier = Modifier.height(2.dp)) Text( text = stringResource(id = videoSettings.videoDownloadQuality.titleResId), - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.labelMedium ) } diff --git a/discussion/src/main/java/org/openedx/discussion/presentation/threads/DiscussionThreadsFragment.kt b/discussion/src/main/java/org/openedx/discussion/presentation/threads/DiscussionThreadsFragment.kt index 99bf4f26e..fd7dc21af 100644 --- a/discussion/src/main/java/org/openedx/discussion/presentation/threads/DiscussionThreadsFragment.kt +++ b/discussion/src/main/java/org/openedx/discussion/presentation/threads/DiscussionThreadsFragment.kt @@ -393,7 +393,7 @@ private fun DiscussionThreadsScreen( text = filterType.first, painter = painterResource(id = discussionR.drawable.discussion_ic_filter), textStyle = MaterialTheme.appTypography.labelMedium, - color = MaterialTheme.appColors.textAccent, + color = MaterialTheme.appColors.textPrimary, onClick = { currentSelectedList = FilterType.type expandedList = listOf( @@ -423,7 +423,7 @@ private fun DiscussionThreadsScreen( text = sortType.first, painter = painterResource(id = discussionR.drawable.discussion_ic_sort), textStyle = MaterialTheme.appTypography.labelMedium, - color = MaterialTheme.appColors.textAccent, + color = MaterialTheme.appColors.textPrimary, onClick = { currentSelectedList = SortType.type expandedList = listOf( @@ -475,7 +475,7 @@ private fun DiscussionThreadsScreen( Modifier .size(40.dp) .clip(CircleShape) - .background(MaterialTheme.appColors.primary) + .background(MaterialTheme.appColors.secondary) .clickable { onCreatePostClick() }, diff --git a/discussion/src/main/java/org/openedx/discussion/presentation/ui/DiscussionUI.kt b/discussion/src/main/java/org/openedx/discussion/presentation/ui/DiscussionUI.kt index 285b01d66..0ffcba440 100644 --- a/discussion/src/main/java/org/openedx/discussion/presentation/ui/DiscussionUI.kt +++ b/discussion/src/main/java/org/openedx/discussion/presentation/ui/DiscussionUI.kt @@ -561,7 +561,7 @@ fun ThreadItem( thread.commentCount - 1 ), painter = painterResource(id = R.drawable.discussion_ic_responses), - color = MaterialTheme.appColors.textAccent, + color = MaterialTheme.appColors.textPrimary, textStyle = MaterialTheme.appTypography.labelLarge) } diff --git a/profile/src/main/java/org/openedx/profile/presentation/delete/DeleteProfileFragment.kt b/profile/src/main/java/org/openedx/profile/presentation/delete/DeleteProfileFragment.kt index 50771187a..da7a53352 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/delete/DeleteProfileFragment.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/delete/DeleteProfileFragment.kt @@ -250,7 +250,7 @@ fun DeleteProfileScreen( .fillMaxWidth(), text = stringResource(id = profileR.string.profile_confirm_action), style = MaterialTheme.appTypography.labelLarge, - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, textAlign = TextAlign.Center ) Spacer(Modifier.height(40.dp)) diff --git a/profile/src/main/java/org/openedx/profile/presentation/edit/EditProfileFragment.kt b/profile/src/main/java/org/openedx/profile/presentation/edit/EditProfileFragment.kt index 1efdc094e..93b1c610b 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/edit/EditProfileFragment.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/edit/EditProfileFragment.kt @@ -611,7 +611,7 @@ private fun EditProfileScreen( Text( modifier = Modifier.testTag("txt_edit_profile_type_label"), text = stringResource(if (uiState.isLimited) R.string.profile_limited_profile else R.string.profile_full_profile), - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.titleSmall ) Spacer(modifier = Modifier.height(32.dp)) @@ -1138,14 +1138,14 @@ private fun LeaveProfile( OpenEdXButton( text = stringResource(id = R.string.profile_leave), onClick = onLeaveClick, - backgroundColor = MaterialTheme.appColors.warning, + backgroundColor = MaterialTheme.appColors.primary, content = { Text( modifier = Modifier .testTag("txt_leave") .fillMaxWidth(), text = stringResource(id = R.string.profile_leave), - color = MaterialTheme.appColors.textDark, + color = MaterialTheme.appColors.buttonText, style = MaterialTheme.appTypography.labelLarge, textAlign = TextAlign.Center ) @@ -1153,7 +1153,7 @@ private fun LeaveProfile( ) Spacer(Modifier.height(24.dp)) OpenEdXOutlinedButton( - borderColor = MaterialTheme.appColors.textPrimary, + borderColor = MaterialTheme.appColors.textFieldBorder, textColor = MaterialTheme.appColors.textPrimary, text = stringResource(id = R.string.profile_keep_editing), onClick = onDismissRequest @@ -1230,20 +1230,20 @@ private fun LeaveProfileLandscape( ) { OpenEdXButton( text = stringResource(id = R.string.profile_leave), - backgroundColor = MaterialTheme.appColors.warning, + backgroundColor = MaterialTheme.appColors.primary, content = { AutoSizeText( modifier = Modifier.testTag("txt_leave_profile_dialog_leave"), text = stringResource(id = R.string.profile_leave), style = MaterialTheme.appTypography.bodyMedium, - color = MaterialTheme.appColors.textDark + color = MaterialTheme.appColors.buttonText ) }, onClick = onLeaveClick ) Spacer(Modifier.height(16.dp)) OpenEdXOutlinedButton( - borderColor = MaterialTheme.appColors.textPrimary, + borderColor = MaterialTheme.appColors.textFieldBorder, textColor = MaterialTheme.appColors.textPrimary, text = stringResource(id = R.string.profile_keep_editing), onClick = onDismissRequest, diff --git a/profile/src/main/java/org/openedx/profile/presentation/profile/compose/ProfileView.kt b/profile/src/main/java/org/openedx/profile/presentation/profile/compose/ProfileView.kt index 9ae81cc05..bb5b5be86 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/profile/compose/ProfileView.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/profile/compose/ProfileView.kt @@ -49,7 +49,6 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.painterResource @@ -265,7 +264,7 @@ private fun SettingsSection(onVideoSettingsClick: () -> Unit) { modifier = Modifier.testTag("txt_settings"), text = stringResource(id = org.openedx.profile.R.string.profile_settings), style = MaterialTheme.appTypography.labelLarge, - color = MaterialTheme.appColors.textSecondary + color = MaterialTheme.appColors.textFieldText ) Spacer(modifier = Modifier.height(14.dp)) Card( @@ -295,7 +294,7 @@ private fun SupportInfoSection( modifier = Modifier.testTag("txt_support_info"), text = stringResource(id = org.openedx.profile.R.string.profile_support_info), style = MaterialTheme.appTypography.labelLarge, - color = MaterialTheme.appColors.textSecondary + color = MaterialTheme.appColors.textFieldText ) Spacer(modifier = Modifier.height(14.dp)) Card( @@ -470,7 +469,7 @@ private fun LogoutDialog( Spacer(Modifier.size(36.dp)) OpenEdXButton( text = stringResource(id = org.openedx.profile.R.string.profile_logout), - backgroundColor = MaterialTheme.appColors.warning, + backgroundColor = MaterialTheme.appColors.textSecondary, onClick = onLogoutClick, content = { Box( @@ -484,7 +483,7 @@ private fun LogoutDialog( .testTag("txt_logout") .fillMaxWidth(), text = stringResource(id = org.openedx.profile.R.string.profile_logout), - color = MaterialTheme.appColors.textDark, + color = MaterialTheme.appColors.buttonText, style = MaterialTheme.appTypography.labelLarge, textAlign = TextAlign.Center ) @@ -493,7 +492,7 @@ private fun LogoutDialog( .testTag("ic_logout"), painter = painterResource(id = org.openedx.profile.R.drawable.profile_ic_logout), contentDescription = null, - tint = Color.Black + tint = MaterialTheme.appColors.buttonText ) } } @@ -601,7 +600,7 @@ private fun AppVersionItemAppToDate(versionName: String) { Text( modifier = Modifier.testTag("txt_up_to_date"), text = stringResource(id = R.string.core_up_to_date), - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.labelLarge ) } diff --git a/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsFragment.kt b/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsFragment.kt index 1fba67564..af46586fb 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsFragment.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsFragment.kt @@ -204,7 +204,7 @@ private fun VideoSettingsScreen( Text( modifier = Modifier.testTag("txt_wifi_only_description"), text = stringResource(id = R.string.profile_only_download_when_wifi_turned_on), - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.labelMedium ) } @@ -241,7 +241,7 @@ private fun VideoSettingsScreen( Spacer(Modifier.height(4.dp)) Text( text = stringResource(id = videoSettings.videoStreamingQuality.titleResId), - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.labelMedium ) } @@ -272,7 +272,7 @@ private fun VideoSettingsScreen( Spacer(Modifier.height(4.dp)) Text( text = stringResource(id = videoSettings.videoDownloadQuality.titleResId), - color = MaterialTheme.appColors.textSecondary, + color = MaterialTheme.appColors.textFieldText, style = MaterialTheme.appTypography.labelMedium ) } diff --git a/profile/src/main/java/org/openedx/profile/presentation/ui/ProfileUI.kt b/profile/src/main/java/org/openedx/profile/presentation/ui/ProfileUI.kt index c47820f23..ef646928c 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/ui/ProfileUI.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/ui/ProfileUI.kt @@ -94,7 +94,7 @@ fun ProfileInfoSection(account: Account) { modifier = Modifier.testTag("txt_profile_info_label"), text = stringResource(id = org.openedx.profile.R.string.profile_prof_info), style = MaterialTheme.appTypography.labelLarge, - color = MaterialTheme.appColors.textSecondary + color = MaterialTheme.appColors.textFieldText ) Spacer(modifier = Modifier.height(14.dp)) Card(