From 19ae5b6b529efa8b681a4e6f26ed55c075b107ea Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 19 May 2026 15:50:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B9=B4=E8=A7=86=E5=9B=BE=20MiniMonth?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E6=A0=87=E9=A2=98=E4=B8=8E=E6=98=9F?= =?UTF-8?q?=E6=9C=9F=E8=A1=8C=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- .../commonMain/kotlin/plus/rua/project/ui/YearGridView.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/YearGridView.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/YearGridView.kt index 2b43dc6..507624c 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/YearGridView.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/YearGridView.kt @@ -193,10 +193,11 @@ private fun MiniMonth( val density = LocalDensity.current val dayRowCount = days.size / 7 val titleHeightPx = with(density) { 14.sp.toPx() } + val titleToWeekdayGapPx = with(density) { 4.dp.toPx() } val weekdayHeightPx = with(density) { 12.sp.toPx() } val dayCellHeightPx = with(density) { (12.sp.toPx() + 4.dp.toPx()) } val totalHeight = with(density) { - (titleHeightPx + weekdayHeightPx + dayRowCount * dayCellHeightPx).toDp() + (titleHeightPx + titleToWeekdayGapPx + weekdayHeightPx + dayRowCount * dayCellHeightPx).toDp() } Column( @@ -220,7 +221,7 @@ private fun MiniMonth( ) // 2. 绘制星期行 - val weekdayY = titleHeightPx + val weekdayY = titleHeightPx + titleToWeekdayGapPx WEEKDAY_LABELS.forEachIndexed { i, label -> val layout = weekdayLayouts[label]!! drawText( @@ -233,7 +234,7 @@ private fun MiniMonth( } // 3. 绘制日期网格 - val dayGridY = titleHeightPx + weekdayHeightPx + val dayGridY = weekdayY + weekdayHeightPx days.forEachIndexed { index, dayData -> val row = index / 7