From 917ba2125f154d6953c3f845cb510432cac8b068 Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 18 May 2026 15:33:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=A8=E8=A7=86=E5=9B=BE=E7=BF=BB=E9=A1=B5?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20cross-fade=20=E5=8A=A8=E7=94=BB=EF=BC=8C?= =?UTF-8?q?=E6=B6=88=E9=99=A4=E5=88=87=E6=8D=A2=E7=A9=BA=E7=99=BD=E9=97=B4?= =?UTF-8?q?=E9=9A=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt index e500203..6ba5664 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt @@ -71,7 +71,12 @@ fun WeekPager( modifier = modifier ) { page -> val pageOffset = abs(pagerState.currentPageOffsetFraction) - val alpha = 1f - pageOffset.coerceIn(0f, 0.3f) / 0.3f + val isCurrentPage = page == pagerState.currentPage + val alpha = if (isCurrentPage) { + 1f - pageOffset + } else { + pageOffset + } val weekMonday = pageToWeekMonday(page, initialWeekMonday) Row( modifier = Modifier