From 9a7b706486ec483b77d902a2fb5b31fa9ef17ce4 Mon Sep 17 00:00:00 2001 From: Nishant Mishra Date: Thu, 16 Oct 2025 17:08:33 +0530 Subject: [PATCH] fix(ui): fix top bar text wrapping into two lines Closes: #76 --- .../nsh07/pomodoro/ui/timerScreen/TimerScreen.kt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/timerScreen/TimerScreen.kt b/app/src/main/java/org/nsh07/pomodoro/ui/timerScreen/TimerScreen.kt index 6fb988b..bdb563d 100644 --- a/app/src/main/java/org/nsh07/pomodoro/ui/timerScreen/TimerScreen.kt +++ b/app/src/main/java/org/nsh07/pomodoro/ui/timerScreen/TimerScreen.kt @@ -138,7 +138,9 @@ fun TimerScreen( targetOffsetY = { (it * 1.25).toInt() } ) ) - } + }, + contentAlignment = Alignment.Center, + modifier = Modifier.fillMaxWidth() ) { when (it) { TimerMode.BRAND -> @@ -150,8 +152,7 @@ fun TimerScreen( lineHeight = 32.sp, color = colorScheme.error ), - textAlign = TextAlign.Center, - modifier = Modifier.width(210.dp) + textAlign = TextAlign.Center ) TimerMode.FOCUS -> @@ -163,8 +164,7 @@ fun TimerScreen( lineHeight = 32.sp, color = colorScheme.primary ), - textAlign = TextAlign.Center, - modifier = Modifier.width(210.dp) + textAlign = TextAlign.Center ) TimerMode.SHORT_BREAK -> Text( @@ -175,8 +175,7 @@ fun TimerScreen( lineHeight = 32.sp, color = colorScheme.tertiary ), - textAlign = TextAlign.Center, - modifier = Modifier.width(210.dp) + textAlign = TextAlign.Center ) TimerMode.LONG_BREAK -> Text( @@ -187,8 +186,7 @@ fun TimerScreen( lineHeight = 32.sp, color = colorScheme.tertiary ), - textAlign = TextAlign.Center, - modifier = Modifier.width(210.dp) + textAlign = TextAlign.Center ) } }