Skip to content

Commit 0001e4a

Browse files
authored
Merge pull request #185 from code-payments/chore/align-textstyles
chore: correct caption type definition; remove overline
2 parents 734df51 + fb4dba5 commit 0001e4a

11 files changed

Lines changed: 13 additions & 27 deletions

File tree

app/src/main/java/com/getcode/theme/Type.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ internal val typography = Typography(
102102
textAlign = TextAlign.Center
103103
),
104104
caption = TextStyle(
105-
fontFamily = Avenir,
106-
fontSize = 16.sp,
107-
fontWeight = FontWeight.SemiBold,
108-
lineHeight = 19.sp,
109-
//letterSpacing = 0.4.sp
110-
),
111-
overline = TextStyle(
112105
fontFamily = Avenir,
113106
fontSize = 12.sp,
114107
fontWeight = FontWeight.SemiBold,

app/src/main/java/com/getcode/ui/components/TextSection.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ fun TextSection(title: String, description: String) {
1414
Column(verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2)) {
1515
Text(
1616
text = title,
17-
style = CodeTheme.typography.h6.copy(
18-
fontWeight = FontWeight.Bold,
19-
)
17+
style = CodeTheme.typography.subtitle1
2018
)
2119
Text(
2220
text = description,
23-
style = CodeTheme.typography.subtitle2
21+
style = CodeTheme.typography.body2
2422
)
2523
}
2624
}

app/src/main/java/com/getcode/ui/components/chat/MessageNode.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private fun MessageText(modifier: Modifier = Modifier, text: String, date: Insta
172172
Text(
173173
modifier = Modifier.align(Alignment.End),
174174
text = date.formatTimeRelatively(),
175-
style = CodeTheme.typography.overline,
175+
style = CodeTheme.typography.caption,
176176
color = BrandLight,
177177
)
178178
}

app/src/main/java/com/getcode/view/login/LoginHome.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ fun LoginHome() {
138138

139139
ClickableText(
140140
text = bottomString,
141-
style = CodeTheme.typography.overline.copy(
141+
style = CodeTheme.typography.caption.copy(
142142
textAlign = TextAlign.Center,
143143
color = BrandLight
144144
),

app/src/main/java/com/getcode/view/main/account/AccountHome.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fun ListItem(item: AccountMainItem, onClick: () -> Unit) {
171171
text = if (isPhoneLinked) stringResource(id = R.string.title_linked)
172172
else stringResource(id = R.string.title_notLinked),
173173
color = BrandLight,
174-
style = CodeTheme.typography.caption.copy(
174+
style = CodeTheme.typography.body1.copy(
175175
fontSize = 12.sp
176176
),
177177
)

app/src/main/java/com/getcode/view/main/account/BetaFlagsScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fun BetaFlagsScreen(
9696
modifier = Modifier
9797
.padding(vertical = CodeTheme.dimens.grid.x1),
9898
text = option.subtitleText,
99-
style = CodeTheme.typography.overline,
99+
style = CodeTheme.typography.caption,
100100
color = BrandLight
101101
)
102102
}

app/src/main/java/com/getcode/view/main/account/ConfirmDeleteAccount.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fun ConfirmDeleteAccount(
4040
) {
4141
Text(
4242
text = stringResource(id = R.string.subtitle_deleteAccountDescription),
43-
style = CodeTheme.typography.subtitle2
43+
style = CodeTheme.typography.body2
4444
)
4545
TextField(
4646
modifier = Modifier
@@ -49,14 +49,14 @@ fun ConfirmDeleteAccount(
4949
placeholder = {
5050
Text(
5151
stringResource(id = R.string.subtitle_typeDelete).format(viewModel.requiredPhrase),
52-
style = CodeTheme.typography.caption
52+
style = CodeTheme.typography.body1
5353
)
5454
},
5555
value = viewModel.typedText.collectAsState().value,
5656
onValueChange = {
5757
viewModel.onTextUpdated(it)
5858
},
59-
textStyle = CodeTheme.typography.caption,
59+
textStyle = CodeTheme.typography.body1,
6060
singleLine = true,
6161
colors = inputColors(),
6262
shape = CodeTheme.shapes.extraSmall

app/src/main/java/com/getcode/view/main/account/withdraw/AccountWithdrawAddress.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ fun AccountWithdrawAddress(
9595
.padding(start = CodeTheme.dimens.grid.x2),
9696
text = text,
9797
color = if (isValid) green else Color.Red,
98-
style = CodeTheme.typography.caption.copy(
99-
fontSize = 12.sp
100-
)
98+
style = CodeTheme.typography.caption
10199
)
102100
}
103101
}

app/src/main/java/com/getcode/view/main/currency/CurrencySelectionSheet.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ fun CurrencySelectionSheet(
182182
) {
183183
Text(
184184
modifier = Modifier.padding(bottom = 10.dp),
185-
style = CodeTheme.typography.caption.copy(
186-
fontSize = 14.sp,
187-
),
185+
style = CodeTheme.typography.body2,
188186
color = BrandLight,
189187
text = listItem.text
190188
)

app/src/main/java/com/getcode/view/main/getKin/GetKinSheet.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ fun GetKinSheet(
219219
Text(
220220
modifier = Modifier.padding(top = CodeTheme.dimens.grid.x1),
221221
text = stringResource(it),
222-
style = CodeTheme.typography.caption,
223-
fontSize = 13.sp,
222+
style = CodeTheme.typography.body2,
224223
color = colorResource(R.color.code_brand_light),
225224
)
226225
}

0 commit comments

Comments
 (0)