From dc6c082968c4af9db3ff3c617cabb7678796ff11 Mon Sep 17 00:00:00 2001 From: Farhan Arshad Date: Tue, 7 Nov 2023 22:54:24 +0500 Subject: [PATCH] fix: improve dates chip deisgn --- .../presentation/dates/CourseDatesFragment.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesFragment.kt b/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesFragment.kt index 62a90d802..89607a653 100644 --- a/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesFragment.kt +++ b/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesFragment.kt @@ -68,7 +68,6 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.em import androidx.compose.ui.unit.sp import androidx.compose.ui.zIndex import androidx.core.os.bundleOf @@ -487,7 +486,7 @@ private fun PlaceDateBadge(title: String, titleSize: TextUnit, blockBadge: Cours padding = RoundedCornerSpanPainter.TextPaddingValues( horizontal = 8.sp, vertical = 6.sp - ), topMargin = 4.sp, + ), topMargin = 5.sp, bottomMargin = 4.sp, stroke = RoundedCornerSpanPainter.Stroke( color = badgeStrokeColor @@ -521,9 +520,9 @@ private fun PlaceDateBadge(title: String, titleSize: TextUnit, blockBadge: Cours badgeIcon?.let { inlineContent["icon_id"] = InlineTextContent( Placeholder( - width = 18.sp, - height = 18.sp, - placeholderVerticalAlign = PlaceholderVerticalAlign.TextCenter + width = 16.sp, + height = 16.sp, + placeholderVerticalAlign = PlaceholderVerticalAlign.Center ) ) { Icon(badgeIcon, "", tint = MaterialTheme.appColors.datesBadgeTextDue) @@ -540,7 +539,7 @@ private fun PlaceDateBadge(title: String, titleSize: TextUnit, blockBadge: Cours inlineContent = inlineContent, fontSize = titleSize, fontWeight = FontWeight.SemiBold, - lineHeight = 1.25.em + lineHeight = 22.sp ) } @@ -560,7 +559,7 @@ private fun CourseDateItem(courseDateItem: CourseDateBlock, parentBadgeAdded: Bo text = courseDateItem.title, fontSize = 16.sp, fontWeight = FontWeight.SemiBold, - lineHeight = 1.25.em, + lineHeight = 20.sp ) } if (!TextUtils.isEmpty(courseDateItem.description)) { @@ -568,7 +567,7 @@ private fun CourseDateItem(courseDateItem: CourseDateBlock, parentBadgeAdded: Bo text = courseDateItem.description, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, - lineHeight = 1.25.em, + lineHeight = 18.sp ) } }