Skip to content

Commit

Permalink
ANDROAPP-5714-Font-weight-of-accordian-title (#147)
Browse files Browse the repository at this point in the history
* update: [ANDROAPP-5714] section title font weight modified

* update: [ANDROAPP-5714] title font weight updated

* update: [ANDROAPP-5714] typography changed

* update: [ANDROAPP-5714] code formatted

* update: [ANDROAPP-5714] styles modified
  • Loading branch information
DavidAparicioAlbaAsenjo authored Nov 15, 2023
1 parent 2e2d4ed commit 1b8bebc
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import org.hisp.dhis.mobile.ui.designsystem.component.LegendRange
import org.hisp.dhis.mobile.ui.designsystem.component.SubTitle
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor

@Composable
fun LegendDescriptionScreen() {
Expand Down Expand Up @@ -44,7 +43,7 @@ fun LegendDescriptionScreen() {
IntRange(0, 5),
),
LegendDescriptionData(SurfaceColor.CustomYellow, "Medium", IntRange(5, 10)),
LegendDescriptionData(TextColor.OnWarning, "High", IntRange(10, 20)),
LegendDescriptionData(SurfaceColor.Warning, "High", IntRange(10, 20)),
LegendDescriptionData(SurfaceColor.CustomPink, "Very high", IntRange(20, 40)),
LegendDescriptionData(SurfaceColor.CustomBrown, "Extreme", IntRange(40, 120)),
LegendDescriptionData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import org.hisp.dhis.mobile.ui.designsystem.component.LegendDescriptionData
import org.hisp.dhis.mobile.ui.designsystem.component.SubTitle
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor

@Composable
fun LegendScreen() {
Expand All @@ -21,7 +20,7 @@ fun LegendScreen() {
Spacer(Modifier.size(Spacing.Spacing18))

SubTitle("Orange Legend")
Legend(LegendData(TextColor.OnWarning, "Legend"))
Legend(LegendData(SurfaceColor.Warning, "Legend"))
Spacer(Modifier.size(Spacing.Spacing18))

SubTitle("Pink Legend")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.hisp.dhis.common.screens.previews

import org.hisp.dhis.mobile.ui.designsystem.component.LegendDescriptionData
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor

val regularLegendList = listOf(
LegendDescriptionData(
Expand All @@ -16,7 +15,7 @@ val regularLegendList = listOf(
IntRange(5, 10),
),
LegendDescriptionData(
TextColor.OnWarning,
SurfaceColor.Warning,
"High",
IntRange(10, 20),
),
Expand Down Expand Up @@ -49,7 +48,7 @@ val longLegendList = listOf(
IntRange(5, 10),
),
LegendDescriptionData(
TextColor.OnWarning,
SurfaceColor.Warning,
"High",
IntRange(10, 20),
),
Expand Down Expand Up @@ -79,7 +78,7 @@ val longLegendList = listOf(
IntRange(5, 10),
),
LegendDescriptionData(
TextColor.OnWarning,
SurfaceColor.Warning,
"High",
IntRange(10, 20),
),
Expand Down Expand Up @@ -109,7 +108,7 @@ val longLegendList = listOf(
IntRange(5, 10),
),
LegendDescriptionData(
TextColor.OnWarning,
SurfaceColor.Warning,
"High",
IntRange(10, 20),
),
Expand Down Expand Up @@ -139,7 +138,7 @@ val longLegendList = listOf(
IntRange(5, 10),
),
LegendDescriptionData(
TextColor.OnWarning,
SurfaceColor.Warning,
"High",
IntRange(10, 20),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,5 @@ enum class InputShellState(val color: Color) {
UNFOCUSED(TextColor.OnSurfaceVariant),
ERROR(SurfaceColor.Error),
DISABLED(TextColor.OnDisabledSurface),
WARNING(TextColor.OnWarning),
WARNING(SurfaceColor.Warning),
}
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ enum class AdditionalInfoItemColor(val color: Color) {
DEFAULT_KEY(TextColor.OnSurfaceLight),
DEFAULT_VALUE(TextColor.OnSurface),
ERROR(SurfaceColor.Error),
WARNING(TextColor.OnWarning),
WARNING(SurfaceColor.Warning),
DISABLED(TextColor.OnDisabledSurface),
SUCCESS(SurfaceColor.CustomGreen),
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fun SupportingText(

enum class SupportingTextState(val color: Color) {
DEFAULT(TextColor.OnSurfaceVariant),
WARNING(TextColor.OnWarning),
WARNING(SurfaceColor.Warning),
ERROR(SurfaceColor.Error),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package org.hisp.dhis.mobile.ui.designsystem.theme
object SurfaceColor {
val Primary = Color.Blue500
val Error = Color.Red600
val Warning = Color.Orange800
val PrimaryContainer = Color.Blue50
val Surface = Color.NeutralVariant
val SurfaceBright = Color.NeutralWhite
val SurfaceDim = Color.Ash500
val SurfaceDim = Color.Ash400
val DisabledSurface = Color.Ash300
val DisabledSurfaceBright = Color.Ash200
val ErrorContainer = Color.Red200
val ErrorContainer = Color.Red100
val WarningContainer = Color.Orange50
val ContainerLowest = Color.NeutralWhite
val ContainerLow = Color.Blue50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ object TextColor {
val OnSurfaceVariant = Color.Charcoal500
val OnSurfaceLight = Color.Charcoal300
val OnError = Color.NeutralWhite
val OnErrorContainer = Color.Red900
val OnErrorContainer = Color.Red700
val OnDisabledSurface = Color.Ash800
val OnWarning = Color.Orange800
val OnWarning = Color.NeutralWhite
val OnWarningContainer = Color.Orange900
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fun DHIS2Theme(content: @Composable () -> Unit) {
color = TextColor.OnSurface,
),
titleLarge = TextStyle(
fontSize = 22.sp,
fontSize = 20.sp,
lineHeight = 28.sp,
fontFamily = provideFontResource(),
fontWeight = FontWeight.Medium,
Expand Down Expand Up @@ -137,19 +137,21 @@ fun DHIS2Theme(content: @Composable () -> Unit) {

internal object DHIS2SCustomTextStyles {

val titleBold = TextStyle(
val titleMediumBold = TextStyle(
fontSize = 16.sp,
lineHeight = 24.sp,
fontWeight = FontWeight.Medium,
fontWeight = FontWeight.Bold,
color = TextColor.OnSurface,
letterSpacing = 0.15.sp,
)

val bodyLargeBold
@Composable
get() = MaterialTheme.typography.bodyLarge.copy(
fontWeight = FontWeight.Bold,
)
val bodyLargeBold = TextStyle(
fontSize = 16.sp,
lineHeight = 24.sp,
fontWeight = FontWeight.Bold,
color = TextColor.OnSurface,
letterSpacing = 0.5.sp,
)

val clickableSupportingText = SpanStyle(
fontSize = 14.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ class ListCardTest {
Icon(
imageVector = Icons.Outlined.SyncProblem,
contentDescription = "Icon Button",
tint = TextColor.OnWarning,
tint = SurfaceColor.Warning,
)
},
value = "Sync warning",
color = TextColor.OnWarning,
color = SurfaceColor.Warning,
isConstantItem = true,
),
AdditionalInfoItem(
Expand Down

0 comments on commit 1b8bebc

Please sign in to comment.