From f63b57eef1b5680dcd172016fabbd92b841ce036 Mon Sep 17 00:00:00 2001 From: meyou <2636699780@qq.com> Date: Sat, 16 May 2026 18:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E6=A0=87=E5=8A=A0=20surface=20?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=92=AC=E5=BC=80=E6=8F=8F=E8=BE=B9=E5=9C=86?= =?UTF-8?q?,=E4=BB=8A=E6=97=A5=E6=9C=AA=E9=80=89=E4=B8=AD=E6=97=B6?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=8F=8F=E8=BE=B9=E5=8F=AA=E7=95=99=20primar?= =?UTF-8?q?y=20=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 角标(休/班)从只是叠在描边圆之上,改为自带 surface 圆背景: 覆盖身后那段弧,产生"咬开圆环"的视觉断点。 同时 TODAY 状态(今日未被选中)去掉描边圆,文字仍保持 primary 主色, 通过文字颜色标识今天,与选中其他日期时形成更清晰的层次。 --- .../kotlin/plus/rua/project/ui/DayCell.kt | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/DayCell.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/DayCell.kt index 628c72a..4ebf09a 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/DayCell.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/DayCell.kt @@ -5,6 +5,7 @@ import androidx.compose.animation.core.FastOutSlowInEasing import androidx.compose.animation.core.animateFloat import androidx.compose.animation.core.tween import androidx.compose.animation.core.updateTransition +import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -114,17 +115,6 @@ fun DayCell( } } - val borderAlpha by transition.animateFloat( - transitionSpec = { tween(250, easing = FastOutSlowInEasing) }, - label = "borderAlpha" - ) { state -> - when (state) { - DayCellState.TODAY -> 1.5f - else -> 0f - } - } - - val todayBorderColor = MaterialTheme.colorScheme.primary val selectedOutlineColor = MaterialTheme.colorScheme.primary data class DayAnnotation(val text: String, val isHighlight: Boolean) @@ -229,14 +219,6 @@ fun DayCell( style = Stroke(width = strokePx) ) } - if (borderAlpha > 0f) { - drawCircle( - color = todayBorderColor.copy(alpha = borderAlpha.coerceAtMost(1f)), - radius = maxRadius, - center = center, - style = Stroke(width = borderAlpha.coerceAtMost(1.5f) * 1.5.dp.toPx()) - ) - } } .clickable(onClick = onClick), contentAlignment = Alignment.Center @@ -272,6 +254,8 @@ fun DayCell( .align(Alignment.TopEnd) .zIndex(1f) .padding(top = 1.dp, end = 2.dp) + .background(MaterialTheme.colorScheme.surface, CircleShape) + .padding(horizontal = 2.dp) ) } }