From 7164bd3e7132a49c55472512ac073e5af938b58a Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Sun, 10 Jul 2022 19:50:03 +0200 Subject: [PATCH] Increased font units by 1 for the smallest text --- src/main/kotlin/app/theme/Typography.kt | 11 ++++++++--- src/main/kotlin/app/ui/Blame.kt | 6 ++---- src/main/kotlin/app/ui/CommitChanges.kt | 2 +- src/main/kotlin/app/ui/UncommitedChanges.kt | 2 +- src/main/kotlin/app/ui/log/Log.kt | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/app/theme/Typography.kt b/src/main/kotlin/app/theme/Typography.kt index 010c6cf..86bec26 100644 --- a/src/main/kotlin/app/theme/Typography.kt +++ b/src/main/kotlin/app/theme/Typography.kt @@ -43,17 +43,22 @@ fun typography() = Typography( letterSpacing = LETTER_SPACING.sp, ), h4 = TextStyle( - fontSize = 16.sp, + fontSize = 17.sp, color = MaterialTheme.colors.primaryTextColor, letterSpacing = LETTER_SPACING.sp, ), body1 = TextStyle( - fontSize = 14.sp, + fontSize = 15.sp, color = MaterialTheme.colors.primaryTextColor, letterSpacing = LETTER_SPACING.sp, ), body2 = TextStyle( - fontSize = 12.sp, + fontSize = 13.sp, + color = MaterialTheme.colors.primaryTextColor, + letterSpacing = LETTER_SPACING.sp, + ), + caption = TextStyle( + fontSize = 11.sp, color = MaterialTheme.colors.primaryTextColor, letterSpacing = LETTER_SPACING.sp, ) diff --git a/src/main/kotlin/app/ui/Blame.kt b/src/main/kotlin/app/ui/Blame.kt index 35b96f8..18c8152 100644 --- a/src/main/kotlin/app/ui/Blame.kt +++ b/src/main/kotlin/app/ui/Blame.kt @@ -109,10 +109,9 @@ fun Blame( ) Text( text = commit?.shortMessage ?: "Uncommited change", - color = MaterialTheme.colors.primaryTextColor, + style = MaterialTheme.typography.caption, maxLines = 1, modifier = Modifier.padding(start = 16.dp), - fontSize = 10.sp, ) } } @@ -167,9 +166,8 @@ fun MinimizedBlame( ) { Text( text = "Minimized file blame", - color = MaterialTheme.colors.primaryTextColor, + style = MaterialTheme.typography.caption, maxLines = 1, - fontSize = 10.sp, ) Text( text = filePath, diff --git a/src/main/kotlin/app/ui/CommitChanges.kt b/src/main/kotlin/app/ui/CommitChanges.kt index b13ba42..a612975 100644 --- a/src/main/kotlin/app/ui/CommitChanges.kt +++ b/src/main/kotlin/app/ui/CommitChanges.kt @@ -114,7 +114,7 @@ fun CommitChangesView( textAlign = TextAlign.Left, color = MaterialTheme.colors.headerText, maxLines = 1, - style = MaterialTheme.typography.body1, + style = MaterialTheme.typography.body2, ) diff --git a/src/main/kotlin/app/ui/UncommitedChanges.kt b/src/main/kotlin/app/ui/UncommitedChanges.kt index 27bfd1f..8382512 100644 --- a/src/main/kotlin/app/ui/UncommitedChanges.kt +++ b/src/main/kotlin/app/ui/UncommitedChanges.kt @@ -461,7 +461,7 @@ private fun EntriesList( fontWeight = FontWeight.Normal, textAlign = TextAlign.Left, color = MaterialTheme.colors.headerText, - style = MaterialTheme.typography.body1, + style = MaterialTheme.typography.body2, maxLines = 1, ) diff --git a/src/main/kotlin/app/ui/log/Log.kt b/src/main/kotlin/app/ui/log/Log.kt index 7a98f08..4f18a66 100644 --- a/src/main/kotlin/app/ui/log/Log.kt +++ b/src/main/kotlin/app/ui/log/Log.kt @@ -858,7 +858,7 @@ fun CommitMessage( Text( text = commit.authorIdent.`when`.toSmartSystemString(), modifier = Modifier.padding(horizontal = 16.dp), - fontSize = 10.sp, + style = MaterialTheme.typography.caption, color = MaterialTheme.colors.secondaryTextColor, maxLines = 1, overflow = TextOverflow.Ellipsis,