From 35725cca681c2da5575142978aefbaf35aa40817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Bispo?= Date: Fri, 6 Nov 2026 12:44:58 +0000 Subject: [PATCH] [PM-34837] Use named FontWeight constants in all text styles Replace the remaining numeric weights (W400, W600, W700) with Normal, SemiBold, and Bold to match the Figma designs. The values are unchanged. --- .../component/AccountSummaryListItem.kt | 2 +- .../account/BitwardenAccountActionItem.kt | 2 +- .../ui/platform/theme/type/Typography.kt | 46 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/component/AccountSummaryListItem.kt b/app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/component/AccountSummaryListItem.kt index f50dd758fc..9278a5fd09 100644 --- a/app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/component/AccountSummaryListItem.kt +++ b/app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/component/AccountSummaryListItem.kt @@ -83,7 +83,7 @@ fun AccountSummaryListItem( fontSize = 11.dp.toUnscaledTextUnit(), lineHeight = 13.dp.toUnscaledTextUnit(), fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, ), color = item.avatarColorHex.hexToColor().toSafeOverlayColor(), ) diff --git a/ui/src/main/kotlin/com/bitwarden/ui/platform/components/account/BitwardenAccountActionItem.kt b/ui/src/main/kotlin/com/bitwarden/ui/platform/components/account/BitwardenAccountActionItem.kt index 605b628d26..de9820229e 100644 --- a/ui/src/main/kotlin/com/bitwarden/ui/platform/components/account/BitwardenAccountActionItem.kt +++ b/ui/src/main/kotlin/com/bitwarden/ui/platform/components/account/BitwardenAccountActionItem.kt @@ -67,7 +67,7 @@ fun BitwardenAccountActionItem( fontSize = 11.dp.toUnscaledTextUnit(), lineHeight = 13.dp.toUnscaledTextUnit(), fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, ), color = color.toSafeOverlayColor(), ) diff --git a/ui/src/main/kotlin/com/bitwarden/ui/platform/theme/type/Typography.kt b/ui/src/main/kotlin/com/bitwarden/ui/platform/theme/type/Typography.kt index eb58b8ee4b..96613b3a69 100644 --- a/ui/src/main/kotlin/com/bitwarden/ui/platform/theme/type/Typography.kt +++ b/ui/src/main/kotlin/com/bitwarden/ui/platform/theme/type/Typography.kt @@ -42,7 +42,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 56.sp, lineHeight = 64.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -54,7 +54,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 44.sp, lineHeight = 52.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -66,7 +66,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 36.sp, lineHeight = 44.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -78,7 +78,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 32.sp, lineHeight = 40.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -90,7 +90,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 28.sp, lineHeight = 36.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -102,7 +102,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 18.sp, lineHeight = 22.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -114,7 +114,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 24.sp, lineHeight = 28.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -126,7 +126,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 19.sp, lineHeight = 28.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -138,7 +138,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 16.sp, lineHeight = 20.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -150,7 +150,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 14.sp, lineHeight = 18.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -162,7 +162,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 15.sp, lineHeight = 20.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -174,7 +174,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 15.sp, lineHeight = 20.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W700, + fontWeight = FontWeight.Bold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -186,7 +186,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 13.sp, lineHeight = 18.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -198,7 +198,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 13.sp, lineHeight = 18.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W700, + fontWeight = FontWeight.Bold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -210,7 +210,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 12.sp, lineHeight = 16.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -222,7 +222,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 14.sp, lineHeight = 20.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -234,7 +234,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 14.sp, lineHeight = 20.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W700, + fontWeight = FontWeight.Bold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -246,7 +246,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 14.sp, lineHeight = 20.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -258,7 +258,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 12.sp, lineHeight = 16.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W600, + fontWeight = FontWeight.SemiBold, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -270,7 +270,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 12.sp, lineHeight = 16.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -282,7 +282,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 14.sp, lineHeight = 20.sp, fontFamily = FontFamily(Font(R.font.roboto_regular_mono)), - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.5.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -294,7 +294,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 16.sp, lineHeight = 24.sp, fontFamily = FontFamily(Font(R.font.roboto_regular_mono)), - fontWeight = FontWeight.W400, + fontWeight = FontWeight.Normal, letterSpacing = 0.5.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center, @@ -306,7 +306,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography( fontSize = 12.sp, lineHeight = 18.sp, fontFamily = bitwardenFontFamily, - fontWeight = FontWeight.W700, + fontWeight = FontWeight.Bold, letterSpacing = 0.6.sp, lineHeightStyle = LineHeightStyle( alignment = LineHeightStyle.Alignment.Center,