From a476ff01fc5edcd726ae968c45ab4523119168d3 Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 14 May 2026 17:24:56 +0800 Subject: [PATCH] Add bottom padding to WeekdayHeader and account for it in collapse offset Co-Authored-By: Claude Opus 4.7 --- .../kotlin/plus/rua/project/ui/CalendarMonthView.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt index 8f69e76..e1f2011 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt @@ -64,7 +64,9 @@ fun CalendarMonthView( expandedGridHeightPx } else 0 - val cardTopPx = headerHeightPx + gridHeightPx + val rowPaddingPx = with(density) { 2.dp.toPx() }.toInt() + + val cardTopPx = headerHeightPx + gridHeightPx + rowPaddingPx val cardHeightPx = screenHeightPx - cardTopPx val pagerModifier = if (p > 0.01f && expandedGridHeightPx > 0) { @@ -104,7 +106,7 @@ fun CalendarMonthView( WeekdayHeader( modifier = Modifier.fillMaxWidth().onSizeChanged { size -> weekdayHeaderHeightPx = size.height - } + }.padding(bottom = 2.dp) ) // 完全折叠且无动画时显示 WeekPager,否则显示 CalendarPager(含下拉恢复过程) if (viewModel.isCollapsed && viewModel.collapseProgress >= 1f) {