From 888c4d03d39d5a5ba38f0c4743047df22509c29a Mon Sep 17 00:00:00 2001 From: meyou <2636699780@qq.com> Date: Sat, 16 May 2026 15:39:38 +0800 Subject: [PATCH] Use baseline alignment for month text and week number --- .../commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt index 2b8f151..a7f2e0e 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt @@ -41,7 +41,7 @@ fun MonthHeader( .fillMaxWidth() .padding(vertical = 14.dp, horizontal = 12.dp) .then(if (onClick != null) Modifier.clickable(onClick = onClick) else Modifier), - verticalAlignment = Alignment.Bottom + verticalAlignment = Alignment.CenterVertically ) { AnimatedContent( targetState = Pair(year, month), @@ -53,7 +53,8 @@ fun MonthHeader( slideInVertically(tween(250)) { it } + fadeIn(tween(250)) togetherWith slideOutVertically(tween(250)) { -it } + fadeOut(tween(250)) } - } + }, + modifier = Modifier.alignByBaseline() ) { (y, m) -> Text( text = "${y}年${m}月", @@ -71,7 +72,8 @@ fun MonthHeader( slideInVertically(tween(250)) { it } + fadeIn(tween(250)) togetherWith slideOutVertically(tween(250)) { -it } + fadeOut(tween(250)) } - } + }, + modifier = Modifier.alignByBaseline() ) { week -> Text( text = "第${week}周",