Skip to content

Commit 96cce67

Browse files
ovitrifmkevins
andauthored
Improve code to set line height relative to font size
Co-authored-by: Matthew Kevins <mkevins@users.noreply.github.com>
1 parent 9c302b6 commit 96cce67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/components

WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/components/LoopingText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private const val FIXED_FONT_SIZE = 40
2626
@Composable
2727
private fun LargeTexts() {
2828
val fontSize = (FIXED_FONT_SIZE / LocalDensity.current.fontScale).sp
29-
val lineHeight = fontSize / 100 * 105 // last value = % of fontSize
29+
val lineHeight = fontSize * 1.05 // set line height to 5% larger than the font size
3030

3131
val texts = stringArrayResource(R.array.login_prologue_revamped_jetpack_feature_texts)
3232

0 commit comments

Comments
 (0)