From d923deb9f808f2a752c0ec17611125eb43c3eea7 Mon Sep 17 00:00:00 2001 From: "omer.habib" Date: Thu, 11 Jul 2024 16:41:36 +0500 Subject: [PATCH] feat: Update color scheme according to edxApp --- .../edx/org/openedx/core/ui/theme/Colors.kt | 141 +++++++++--------- .../org/openedx/core/ui/theme/LocalShapes.kt | 12 +- .../ui/theme/compose/LogistrationLogoView.kt | 4 + .../core/ui/theme/compose/SignInLogoView.kt | 2 +- .../edx/res/drawable-night/core_ic_logo.xml | 15 -- core/src/edx/res/drawable/core_ic_logo.xml | 22 +-- .../edx/res/drawable/core_ic_logo_white.xml | 15 -- core/src/edx/res/values-night/colors.xml | 4 +- core/src/edx/res/values/colors.xml | 2 + .../main/java/org/openedx/core/ui/IAPUI.kt | 5 +- .../course/presentation/ui/CourseUI.kt | 28 +++- 11 files changed, 127 insertions(+), 123 deletions(-) delete mode 100644 core/src/edx/res/drawable-night/core_ic_logo.xml delete mode 100644 core/src/edx/res/drawable/core_ic_logo_white.xml diff --git a/core/src/edx/org/openedx/core/ui/theme/Colors.kt b/core/src/edx/org/openedx/core/ui/theme/Colors.kt index 22286d16b..2cb72db8c 100644 --- a/core/src/edx/org/openedx/core/ui/theme/Colors.kt +++ b/core/src/edx/org/openedx/core/ui/theme/Colors.kt @@ -3,79 +3,79 @@ package org.openedx.core.ui.theme import androidx.compose.ui.graphics.Color // Light theme colors scheme -val light_primary = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm -val light_primary_variant = Color(0xFF002121) // Primary 700 | Dark 700 -val light_secondary = Color(0xFFD23228) // Brand 500 -val light_secondary_variant = Color(0xFFD23228) // Brand 500 +val light_primary = Color(0xFF00262B) // Primary 500 +val light_primary_variant = Color(0xFF002121) // Primary 700 +val light_secondary = Color(0xFF1F453D) // Brand 500 +val light_secondary_variant = Color(0xFF707070) // Gray 500 val light_background = Color.White -val light_surface = Color.White +val light_surface = Color(0xFFFBFAF9) // Off-White val light_error = Color(0xFFAB0D02) // Danger 500 -val light_warning = Color(0xFFF0CC00) // Accent B Oxide Yellow -val light_info = Color(0xFF03C7E8) // Accent A Isotope Blue -val light_info_variant = Color(0xFF00688D) // Info 500 +val light_warning = Color(0xFFF0CC00) // Warning 300 +val light_info = Color(0xFF00688D) // Info 500 +val light_info_variant = Color(0xFF1C8DBE) // Info 300 val light_onPrimary = Color.White val light_onSecondary = Color.White -val light_onBackground = Color(0xFF454545) -val light_onSurface = Color(0xFF454545) +val light_onBackground = light_primary +val light_onSurface = Color(0xFF454545) // Gray 700 val light_onError = Color.White val light_onWarning = Color.White val light_onInfo = Color.White -val light_success_green = Color(0xFFF2FAF7) -val light_success_background = Color(0xFF0D7D4D) +val light_success_green = Color(0xFF0D7D4D)// Color(0xFFF2FAF7) // Success 500 +val light_success_background = Color(0xFFF2FAF7)//Color(0xFF0D7D4D) // Success 100 -val light_text_primary = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm +val light_text_primary = light_primary // Primary 500 val light_text_primary_variant = Color(0xFF454545) // Gray 700 -val light_text_primary_light = Color(0xFF707070) // Gray 500 -val light_text_hyper_link = Color(0xFF00688D) // Info 500 +val light_text_primary_light = light_secondary_variant +val light_text_hyper_link = light_info // Info 500 -val light_text_secondary = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm -val light_text_dark = Color(0xFF002121) // Primary 700 | Dark 700 -val light_text_warning = Color(0xFF002121) // Primary 700 | Dark 700 +val light_text_secondary = light_primary // Primary 500 | Dark 500 | Elm +val light_text_dark = light_primary_variant // Primary 700 | Dark 700 +val light_text_warning = light_primary_variant // Primary 700 | Dark 700 val light_text_accent = Color(0xFF03C7E8) // Accent A Isotope Blue -val light_text_field_background = Color.White -val light_text_field_background_variant = Color.White -val light_text_field_border = Color(0xFF707070) // Gray 500 -val light_text_field_text = Color(0xFF454545) // Gray 700 -val light_text_field_hint = Color(0xFF707070) // Gray 500 +val light_text_field_background = light_surface +val light_text_field_background_variant = light_surface +val light_text_field_border = light_onSurface +val light_text_field_text = light_text_primary +val light_text_field_hint = light_secondary_variant -val light_primary_button_background = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm -val light_primary_button_text = Color.White -val light_primary_button_border = Color(0xFFD7D3D1) // Light 700 -val light_primary_button_bordered_text = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm +val light_primary_button_background = Color(0xFFD74000) // Brand 500 +val light_primary_button_text = light_surface +val light_primary_button_border = light_primary +val light_primary_button_bordered_text = light_primary -val light_secondary_button_background = Color(0xFFD23228) // Brand 500 -val light_secondary_button_text = Color(0xFFD23228) // Brand 500 -val light_secondary_button_border = Color(0xFFD7D3D1) // Light 700 -val light_secondary_button_bordered_background = Color.White -val light_secondary_button_bordered_text = Color(0xFFD23228) // Brand 500 +val light_secondary_button_background = light_primary +val light_secondary_button_text = light_background +val light_secondary_button_border = light_primary_button_background +val light_secondary_button_bordered_background = light_surface +val light_secondary_button_bordered_text = light_primary_button_background -val light_card_view_background = Color(0xFFF9FAFB) -val light_card_view_border = Color(0xFFCCD4E0) +val light_card_view_background = light_surface +val light_card_view_border = light_text_field_border -val light_divider = Color(0xFFEAE6E5) // -val light_certificate_foreground = Color.White -val light_bottom_sheet_toggle = Color(0xFF03C7E8) // Accent A Isotope Blue +val light_divider = light_primary +val light_certificate_foreground = light_surface +val light_bottom_sheet_toggle = light_text_accent -val light_rate_stars = Color(0xFFF0CC00) // Accent B Oxide Yellow -val light_inactive_button_background = Color(0xFFCCD4E0) +val light_rate_stars = light_warning +val light_inactive_button_background = Color(0xFFFCFCFC) val light_access_green = Color(0xFF23BCA0) -val light_dates_section_bar_past_due = Color(0xFFF0CC00) -val light_dates_section_bar_today = light_info -val light_dates_section_bar_this_week = light_text_primary_variant -val light_dates_section_bar_next_week = light_text_field_border -val light_dates_section_bar_upcoming = Color(0xFFCCD4E0) +val light_dates_section_bar_past_due = Color(0xFFFFC248) +val light_dates_section_bar_today = Color(0xFF5DE3BF) +val light_dates_section_bar_this_week = light_secondary +val light_dates_section_bar_next_week = Color(0xFF798F8B) +val light_dates_section_bar_upcoming = Color(0xFFA5B5B1) val light_auth_sso_success_background = light_success_green val light_auth_google_button_background = Color.White val light_auth_facebook_button_background = Color(0xFF0866FF) val light_auth_microsoft_button_background = Color(0xFF2E2E2E) val light_component_horizontal_progress_completed_and_selected = light_primary -val light_component_horizontal_progress_completed = Color(0xFF8F8F8F) +val light_component_horizontal_progress_completed = Color(0xFF8F8F8F) // Gray 400 val light_component_horizontal_progress_selected = light_primary -val light_component_horizontal_progress_default = Color(0xFF8F8F8F) +val light_component_horizontal_progress_default = Color(0xFF8F8F8F) // Gray 400 val light_tab_unselected_btn_background = light_background val light_tab_unselected_btn_content = light_primary @@ -92,8 +92,8 @@ val dark_primary = Color(0xFFFBFAF9) // Light 200 val dark_primary_variant = Color(0xFFF2F0EF) // Light 300 val dark_secondary = Color(0xFFD23228) // Brand 500 val dark_secondary_variant = Color(0xFFD23228) // Brand 500 -val dark_background = Color(0xFF00262b) // Primary 500 | Dark 500 -val dark_surface = Color(0xFF002121) // Primary 700 | Dark 700 +val dark_background = Color(0xFF00262b) // Primary 500 | Dark 500 +val dark_surface = Color(0xFF1F453D) // Primary 500 | Dark 700 val dark_error = Color(0xFFAB0D02) // Danger 500 val dark_warning = Color(0xFFF0CC00) // Accent B Oxide Yellow val dark_info = Color(0xFF03C7E8) // Accent A Isotope Blue @@ -101,56 +101,56 @@ val dark_info_variant = Color(0xFF00688D) // Info 500 val dark_onPrimary = Color(0xFF002121) // Primary 700 | Dark 700 val dark_onSecondary = Color.White -val dark_onBackground = Color.White +val dark_onBackground = dark_primary val dark_onSurface = Color.White val dark_onError = Color.White val dark_onWarning = Color.White val dark_onInfo = Color.White -val dark_success_green = Color(0xFF0A5E3A) +val dark_success_green = Color(0xFF0D7D4D) // success 500 val dark_success_background = Color.White -val dark_text_primary = Color.White +val dark_text_primary = dark_primary val dark_text_primary_variant = Color(0xFFF2F0EF) // Light 300 val dark_text_primary_light = Color(0xFF707070) // Gray 500 val dark_text_hyper_link = Color(0xFF00688D) // Info 500 val dark_text_secondary = Color.White -val dark_text_dark = Color(0xFFF2F0EF) // Light 300 -val dark_text_warning = Color(0xFFF2F0EF) // Light 300 +val dark_text_dark = dark_text_primary +val dark_text_warning = Color(0xFF002121) // primary 700 val dark_text_accent = Color(0xFF03C7E8) // Accent A Isotope Blue -val dark_text_field_background = Color.White -val dark_text_field_background_variant = Color.White -val dark_text_field_border = Color(0xFF707070) // Gray 500 -val dark_text_field_text = Color.White -val dark_text_field_hint = Color(0xFF707070) // Gray 500 +val dark_text_field_background = dark_surface +val dark_text_field_background_variant = dark_surface +val dark_text_field_border = Color(0xFFD2DAD8) // Gray 500 +val dark_text_field_text = dark_text_primary +val dark_text_field_hint = Color(0xFFD2DAD8) // Gray 700 -val dark_primary_button_background = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm +val dark_primary_button_background = Color(0xFFD74000) // Primary 500 | Dark 500 | Elm val dark_primary_button_text = Color.White -val dark_primary_button_border = Color(0xFFD7D3D1) // Light 700 -val dark_primary_button_bordered_text = Color(0xFF00262B) // Primary 500 | Dark 500 | Elm +val dark_primary_button_border = dark_primary +val dark_primary_button_bordered_text = dark_primary -val dark_secondary_button_background = Color(0xFFD23228) // Brand 500 -val dark_secondary_button_text = Color.White +val dark_secondary_button_background = dark_primary +val dark_secondary_button_text = dark_background val dark_secondary_button_border = Color(0xFFD7D3D1) // Light 700 val dark_secondary_button_bordered_background = Color.White val dark_secondary_button_bordered_text = Color(0xFFD23228) // Brand 500 -val dark_card_view_background = Color(0xFF003839) +val dark_card_view_background = dark_surface val dark_card_view_border = Color(0xFF4E5A70) -val dark_divider = Color(0xFF0E3639) // Dark 400 +val dark_divider = dark_primary val dark_certificate_foreground = Color(0xD92EB865) val dark_bottom_sheet_toggle = Color(0xFF03C7E8) // Accent A Isotope Blue val dark_rate_stars = Color(0xFFF0CC00) // Accent B Oxide Yellow val dark_inactive_button_background = Color(0xFFCCD4E0) val dark_access_green = Color(0xFF23BCA0) -val dark_dates_section_bar_past_due = Color(0xFFF0CC00) // Accent B Oxide Yellow -val dark_dates_section_bar_today = Color(0xFF03C7E8) // Accent A Isotope Blue -val dark_dates_section_bar_this_week = Color(0xFFF2F0EF) // Light 300 -val dark_dates_section_bar_next_week = Color(0xFF707070) // Gray 500 -val dark_dates_section_bar_upcoming = Color(0xFFCCD4E0) +val dark_dates_section_bar_past_due = Color(0xFFFFC248) +val dark_dates_section_bar_today = Color(0xFF5DE3BF) +val dark_dates_section_bar_this_week = Color(0xFFA5B5B1) +val dark_dates_section_bar_next_week = Color(0xFF798F8B) +val dark_dates_section_bar_upcoming = Color(0xFF1F453D) val dark_auth_sso_success_background = dark_success_green val dark_auth_google_button_background = Color.White val dark_auth_facebook_button_background = Color(0xFF0866FF) @@ -159,7 +159,6 @@ val dark_component_horizontal_progress_completed_and_selected = Color.White val dark_component_horizontal_progress_completed = Color(0xFF8F8F8F) val dark_component_horizontal_progress_selected = Color.White val dark_component_horizontal_progress_default = Color(0xFF8F8F8F) - val dark_tab_unselected_btn_background = dark_background val dark_tab_unselected_btn_content = dark_text_primary val dark_tab_selected_btn_content = dark_background diff --git a/core/src/edx/org/openedx/core/ui/theme/LocalShapes.kt b/core/src/edx/org/openedx/core/ui/theme/LocalShapes.kt index 19da9b1c9..98e44e55e 100644 --- a/core/src/edx/org/openedx/core/ui/theme/LocalShapes.kt +++ b/core/src/edx/org/openedx/core/ui/theme/LocalShapes.kt @@ -13,13 +13,13 @@ internal val LocalShapes = staticCompositionLocalOf { medium = RoundedCornerShape(8.dp), large = RoundedCornerShape(0.dp) ), - buttonShape = RoundedCornerShape(0.dp), - navigationButtonShape = RoundedCornerShape(0.dp), - textFieldShape = RoundedCornerShape(CornerSize(0.dp)), - screenBackgroundShape = RoundedCornerShape(topStart = 30.dp, topEnd = 30.dp), - cardShape = RoundedCornerShape(0.dp), + buttonShape = RoundedCornerShape(CornerSize(8.dp)), + navigationButtonShape = RoundedCornerShape(8.dp), + textFieldShape = RoundedCornerShape(CornerSize(8.dp)), + screenBackgroundShape = RoundedCornerShape(topStart = 30.dp, topEnd = 30.dp, bottomStart = 0.dp, bottomEnd = 0.dp), + cardShape = RoundedCornerShape(12.dp), screenBackgroundShapeFull = RoundedCornerShape(24.dp), - courseImageShape = RoundedCornerShape(0.dp), + courseImageShape = RoundedCornerShape(8.dp), dialogShape = RoundedCornerShape(24.dp) ) } diff --git a/core/src/edx/org/openedx/core/ui/theme/compose/LogistrationLogoView.kt b/core/src/edx/org/openedx/core/ui/theme/compose/LogistrationLogoView.kt index c9f1f77e8..908ce2afb 100644 --- a/core/src/edx/org/openedx/core/ui/theme/compose/LogistrationLogoView.kt +++ b/core/src/edx/org/openedx/core/ui/theme/compose/LogistrationLogoView.kt @@ -3,13 +3,16 @@ package org.openedx.core.ui.theme.compose import androidx.compose.foundation.Image import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.material.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.openedx.core.R import org.openedx.core.ui.theme.OpenEdXTheme +import org.openedx.core.ui.theme.appColors @Composable fun LogistrationLogoView() { @@ -19,6 +22,7 @@ fun LogistrationLogoView() { .wrapContentWidth(), painter = painterResource(id = R.drawable.core_ic_logo), contentDescription = null, + colorFilter = ColorFilter.tint(MaterialTheme.appColors.primary), ) } diff --git a/core/src/edx/org/openedx/core/ui/theme/compose/SignInLogoView.kt b/core/src/edx/org/openedx/core/ui/theme/compose/SignInLogoView.kt index 80e3f7967..f1f0a9d04 100644 --- a/core/src/edx/org/openedx/core/ui/theme/compose/SignInLogoView.kt +++ b/core/src/edx/org/openedx/core/ui/theme/compose/SignInLogoView.kt @@ -23,7 +23,7 @@ fun SignInLogoView() { contentAlignment = Alignment.Center ) { Image( - painter = painterResource(id = R.drawable.core_ic_logo_white), + painter = painterResource(id = R.drawable.core_ic_logo), contentDescription = null, modifier = Modifier.padding(top = 20.dp) ) diff --git a/core/src/edx/res/drawable-night/core_ic_logo.xml b/core/src/edx/res/drawable-night/core_ic_logo.xml deleted file mode 100644 index 8e08c5334..000000000 --- a/core/src/edx/res/drawable-night/core_ic_logo.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/core/src/edx/res/drawable/core_ic_logo.xml b/core/src/edx/res/drawable/core_ic_logo.xml index e94781b5f..5b1fb514b 100644 --- a/core/src/edx/res/drawable/core_ic_logo.xml +++ b/core/src/edx/res/drawable/core_ic_logo.xml @@ -1,18 +1,18 @@ - + android:width="151.47116dp" + android:height="89dp" + android:viewportWidth="708" + android:viewportHeight="416"> + + android:pathData="M194.99,161.65c-2.44,-2.84 -5.48,-5.08 -9.1,-6.74c-3.63,-1.65 -7.84,-2.48 -12.65,-2.48c-4.89,0 -9.46,0.87 -13.71,2.6c-4.26,1.73 -8.12,4.2 -11.58,7.39c-3.47,3.19 -6.46,7.01 -8.98,11.46c-2.52,4.45 -4.53,9.4 -6.03,14.83h69.14c0.08,-0.39 0.14,-1.12 0.18,-2.19c0.04,-1.06 0.06,-2.11 0.06,-3.13c0,-4.18 -0.61,-8.14 -1.83,-11.88C199.26,167.78 197.43,164.49 194.99,161.65z" /> + + android:pathData="M325.9,162.3c-2.76,-3.03 -6.11,-5.38 -10.05,-7.03c-3.94,-1.66 -8.39,-2.48 -13.36,-2.48c-6.54,0 -12.61,1.46 -18.2,4.37c-5.6,2.92 -10.44,6.97 -14.54,12.17c-4.1,5.2 -7.33,11.41 -9.69,18.61c-2.36,7.21 -3.55,15.11 -3.55,23.7c0,5.36 0.77,10.28 2.31,14.77c1.54,4.49 3.68,8.33 6.44,11.52c2.76,3.19 6.07,5.67 9.93,7.45c3.86,1.77 8.16,2.66 12.88,2.66c6.62,0 12.74,-1.55 18.38,-4.67c5.63,-3.11 10.54,-7.37 14.71,-12.76c4.18,-5.4 7.45,-11.74 9.81,-19.03c2.36,-7.29 3.55,-15.15 3.55,-23.58c0,-5.44 -0.75,-10.32 -2.25,-14.66C330.78,169.02 328.66,165.34 325.9,162.3z" /> + - + android:pathData="M407.43,103.6l10.65,-50.96H105.3L54,297.65h261.52l-14.4,65.71h250.51l55.26,-259.76H407.43zM223.47,190.43c-0.08,1.7 -0.2,3.43 -0.36,5.2c-0.16,1.77 -0.32,3.51 -0.47,5.2c-0.16,1.69 -0.35,3.13 -0.59,4.31h-91.83c-0.08,1.11 -0.14,2.17 -0.18,3.19c-0.04,1.03 -0.06,2.09 -0.06,3.19c0,6.54 0.95,12.11 2.84,16.72c1.89,4.61 4.35,8.37 7.39,11.29c3.03,2.92 6.44,5.02 10.22,6.32c3.78,1.3 7.6,1.95 11.46,1.95c8.43,0 15.21,-1.46 20.33,-4.37c5.12,-2.91 9.02,-6.85 11.7,-11.82h21.63c-1.34,4.89 -3.55,9.46 -6.62,13.71c-3.07,4.25 -6.95,7.94 -11.64,11.05c-4.69,3.11 -10.13,5.56 -16.31,7.33c-6.19,1.77 -12.98,2.66 -20.39,2.66c-7.09,0 -13.79,-1.16 -20.09,-3.49c-6.3,-2.32 -11.8,-5.75 -16.49,-10.28c-4.69,-4.53 -8.39,-10.1 -11.11,-16.72c-2.72,-6.62 -4.08,-14.22 -4.08,-22.81c0,-11.74 1.63,-22.44 4.9,-32.09c3.27,-9.65 7.82,-17.92 13.65,-24.82c5.83,-6.89 12.82,-12.23 20.98,-16.01c8.15,-3.78 17.08,-5.67 26.77,-5.67c6.54,0 12.74,1.14 18.62,3.43c5.87,2.29 11.01,5.61 15.42,9.99c4.41,4.37 7.92,9.75 10.52,16.13c2.6,6.38 3.9,13.71 3.9,21.98C223.59,187.26 223.55,188.74 223.47,190.43zM319.99,264.12l3.66,-17.37h-1.89c-4.65,6.07 -10.48,10.85 -17.49,14.36c-7.01,3.5 -14.58,5.26 -22.69,5.26c-6.38,0 -12.37,-1.2 -17.97,-3.61c-5.6,-2.4 -10.5,-5.85 -14.71,-10.34c-4.22,-4.49 -7.55,-9.93 -9.99,-16.31c-2.44,-6.38 -3.66,-13.51 -3.66,-21.39c0,-7.64 0.77,-14.95 2.3,-21.92c1.54,-6.97 3.72,-13.43 6.56,-19.38c2.84,-5.95 6.24,-11.33 10.22,-16.13c3.98,-4.81 8.39,-8.9 13.24,-12.29c4.85,-3.39 10.08,-5.99 15.72,-7.8c5.63,-1.81 11.52,-2.72 17.67,-2.72c4.57,0 8.92,0.63 13.06,1.89c4.14,1.26 7.88,3.01 11.23,5.26c3.35,2.25 6.22,4.96 8.63,8.15c2.4,3.19 4.16,6.68 5.26,10.46h1.89l15.72,-74.11h20.68l-37.82,178H319.99zM524.79,329.87H479l-29.94,-65.71h-3.74l-55.41,65.71h-45.51l86.35,-102.3l-40,-90.49h46.66l26.61,62.3h2.48l50.32,-62.3h46.13l-82.43,95.02L524.79,329.87z" /> + \ No newline at end of file diff --git a/core/src/edx/res/drawable/core_ic_logo_white.xml b/core/src/edx/res/drawable/core_ic_logo_white.xml deleted file mode 100644 index 8e08c5334..000000000 --- a/core/src/edx/res/drawable/core_ic_logo_white.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/core/src/edx/res/values-night/colors.xml b/core/src/edx/res/values-night/colors.xml index 80155c620..e26317c3a 100644 --- a/core/src/edx/res/values-night/colors.xml +++ b/core/src/edx/res/values-night/colors.xml @@ -2,6 +2,8 @@ #FF00262b - #FFFBFAF9 + #FFFFFF #00262B + #F2F0EF + #707070 diff --git a/core/src/edx/res/values/colors.xml b/core/src/edx/res/values/colors.xml index 96839eb98..39b83963e 100644 --- a/core/src/edx/res/values/colors.xml +++ b/core/src/edx/res/values/colors.xml @@ -4,4 +4,6 @@ #00262B #FFFFFF + #00262B + #454545 diff --git a/core/src/main/java/org/openedx/core/ui/IAPUI.kt b/core/src/main/java/org/openedx/core/ui/IAPUI.kt index dda585369..80944fa31 100644 --- a/core/src/main/java/org/openedx/core/ui/IAPUI.kt +++ b/core/src/main/java/org/openedx/core/ui/IAPUI.kt @@ -35,7 +35,8 @@ import org.openedx.core.ui.theme.appTypography fun ValuePropUpgradeFeatures(modifier: Modifier = Modifier, courseName: String) { Column( modifier = modifier - .padding(all = 16.dp) + .background(color = MaterialTheme.appColors.background) + .padding(all = 16.dp), ) { Text( modifier = Modifier.padding(vertical = 32.dp), @@ -66,7 +67,7 @@ fun CheckmarkView(text: String) { modifier = Modifier.padding(end = 16.dp), imageVector = Icons.Filled.Check, contentDescription = null, - tint = MaterialTheme.appColors.certificateForeground + tint = MaterialTheme.appColors.successGreen ) Text( modifier = Modifier.weight(1f), diff --git a/course/src/main/java/org/openedx/course/presentation/ui/CourseUI.kt b/course/src/main/java/org/openedx/course/presentation/ui/CourseUI.kt index 28ffe6941..b6f8599e6 100644 --- a/course/src/main/java/org/openedx/course/presentation/ui/CourseUI.kt +++ b/course/src/main/java/org/openedx/course/presentation/ui/CourseUI.kt @@ -1321,6 +1321,32 @@ private fun CourseMessagePreview() { } } +@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +private fun CourseExpendableCardPreview(){ + OpenEdXTheme { + CourseExpandableChapterCard( + block = mockChapterBlock, + arrowDegrees = 0f, + downloadedState = DownloadedState.DOWNLOADED, + onDownloadClick = {} + ) + } +} + +@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +private fun CourseSubSectionItemPreview(){ + OpenEdXTheme { + CourseSubSectionItem( + block = mockChapterBlock, + onClick = {} + ) + } +} + private val mockChapterBlock = Block( id = "id", blockId = "blockId", @@ -1335,7 +1361,7 @@ private val mockChapterBlock = Block( blockCounts = BlockCounts(1), descendants = emptyList(), descendantsType = BlockType.CHAPTER, - completion = 0.0, + completion = 1.0, containsGatedContent = false, assignmentProgress = AssignmentProgress("", 1f, 2f), due = Date()