fix: center EmptyHero vertically between top bar and bottom dock

Orb + greeting + headline were pinned to the top with a fixed spacer,
leaving the bottom half empty. Now vertically centered with padding
that accounts for the floating top bar (76dp) and bottom dock (160dp).
This commit is contained in:
Bruno Deanoz 2026-06-21 17:41:19 +02:00
parent 3560665e83
commit e4c6e7f763

View file

@ -127,11 +127,11 @@ fun EmptyHero(userName: String, onPick: (String) -> Unit, modifier: Modifier = M
Column( Column(
modifier = modifier modifier = modifier
.fillMaxSize() .fillMaxSize()
.verticalScroll(rememberScrollState()) .padding(horizontal = 24.dp)
.padding(horizontal = 24.dp), .padding(top = 76.dp, bottom = 160.dp),
horizontalAlignment = Alignment.CenterHorizontally, horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
) { ) {
Spacer(Modifier.height(48.dp))
KaizenOrb(104.dp) KaizenOrb(104.dp)
Spacer(Modifier.height(24.dp)) Spacer(Modifier.height(24.dp))
Text("${greeting(now.hour)}, $userName", color = cs.onSurfaceVariant, fontSize = 17.sp) Text("${greeting(now.hour)}, $userName", color = cs.onSurfaceVariant, fontSize = 17.sp)
@ -139,7 +139,6 @@ fun EmptyHero(userName: String, onPick: (String) -> Unit, modifier: Modifier = M
Text(stringResource(R.string.hero_headline), color = cs.onBackground, fontSize = 32.sp, fontWeight = FontWeight.Bold) Text(stringResource(R.string.hero_headline), color = cs.onBackground, fontSize = 32.sp, fontWeight = FontWeight.Bold)
Spacer(Modifier.height(8.dp)) Spacer(Modifier.height(8.dp))
Text(dateLine, color = cs.onSurfaceVariant.copy(alpha = 0.7f), fontSize = 13.sp) Text(dateLine, color = cs.onSurfaceVariant.copy(alpha = 0.7f), fontSize = 13.sp)
Spacer(Modifier.height(142.dp))
} }
} }