File tree Expand file tree Collapse file tree 4 files changed +20
-5
lines changed
main/java/org/openedx/core/ui/theme
openedx/org/openedx/core/ui/theme
course/src/main/java/org/openedx/course/presentation/progress Expand file tree Collapse file tree 4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ data class AppColors(
7878 val settingsTitleContent : Color ,
7979
8080 val progressBarColor : Color ,
81- val progressBarBackgroundColor : Color
81+ val progressBarBackgroundColor : Color ,
82+ val gradeProgressBarBorder : Color ,
8283) {
8384 val primary: Color get() = material.primary
8485 val primaryVariant: Color get() = material.primaryVariant
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ private val DarkColorPalette = AppColors(
9696 settingsTitleContent = dark_settings_title_content,
9797
9898 progressBarColor = dark_progress_bar_color,
99- progressBarBackgroundColor = dark_progress_bar_background_color
99+ progressBarBackgroundColor = dark_progress_bar_background_color,
100+ gradeProgressBarBorder = dark_grade_progress_bar_color
100101)
101102
102103private val LightColorPalette = AppColors (
@@ -185,7 +186,8 @@ private val LightColorPalette = AppColors(
185186 settingsTitleContent = light_settings_title_content,
186187
187188 progressBarColor = light_progress_bar_color,
188- progressBarBackgroundColor = light_progress_bar_background_color
189+ progressBarBackgroundColor = light_progress_bar_background_color,
190+ gradeProgressBarBorder = light_grade_progress_bar_color
189191)
190192
191193val MaterialTheme .appColors: AppColors
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ val light_course_home_back_btn_background = Color.White
7474val light_settings_title_content = Color .White
7575val light_progress_bar_color = light_primary
7676val light_progress_bar_background_color = Color (0xFFCCD4E0 )
77+ val light_grade_progress_bar_color = Color .Black
7778
7879val dark_primary = Color (0xFF3F68F8 )
7980val dark_primary_variant = Color (0xFF3700B3 )
@@ -147,3 +148,4 @@ val dark_course_home_back_btn_background = Color.Black
147148val dark_settings_title_content = Color .White
148149val dark_progress_bar_color = light_primary
149150val dark_progress_bar_background_color = Color (0xFF8E9BAE )
151+ val dark_grade_progress_bar_color = Color .Transparent
Original file line number Diff line number Diff line change @@ -310,11 +310,11 @@ private fun OverallGradeView(
310310 .clip(CircleShape )
311311 .border(
312312 width = 1 .dp,
313- color = MaterialTheme .appColors.cardViewBackground ,
313+ color = MaterialTheme .appColors.gradeProgressBarBorder ,
314314 shape = CircleShape
315315 )
316316 ) {
317- gradingPolicy.assignmentPolicies.forEach { assignmentPolicy ->
317+ gradingPolicy.assignmentPolicies.forEachIndexed { index, assignmentPolicy ->
318318 val assignmentColors = gradingPolicy.assignmentColors
319319 val color = if (assignmentColors.isNotEmpty()) {
320320 assignmentColors[
@@ -334,6 +334,16 @@ private fun OverallGradeView(
334334 .background(color)
335335 .fillMaxHeight()
336336 )
337+
338+ // Add black separator between assignment policies (except after the last one)
339+ if (index < gradingPolicy.assignmentPolicies.size - 1 ) {
340+ Box (
341+ modifier = Modifier
342+ .width(1 .dp)
343+ .background(Color .Black )
344+ .fillMaxHeight()
345+ )
346+ }
337347 }
338348 }
339349 if (notCompletedWeightedGradePercent > 0f ) {
You can’t perform that action at this time.
0 commit comments