From 134fc5a9c6997b5b53a4263a6c8233d5c34dd6b7 Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 25 May 2026 10:12:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E7=8F=AD=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9C=86=E5=BD=A2=E5=BA=95=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E4=B8=8E=E9=80=89=E4=B8=AD=E5=9C=86=E7=8E=AF=E9=87=8D?= =?UTF-8?q?=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将右上角排班 Text 包裹在 Box 中 - Box 添加 CircleShape + 背景色,遮挡选中状态的描边圆环 - 非选中时背景色与 cell 背景一致,视觉上仍是裸文字 Co-Authored-By: Claude Opus 4.7 (1M context) --- .../kotlin/plus/rua/project/ui/DayCell.kt | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/core/src/main/kotlin/plus/rua/project/ui/DayCell.kt b/core/src/main/kotlin/plus/rua/project/ui/DayCell.kt index 83e2c25..e243c1d 100644 --- a/core/src/main/kotlin/plus/rua/project/ui/DayCell.kt +++ b/core/src/main/kotlin/plus/rua/project/ui/DayCell.kt @@ -247,17 +247,23 @@ fun DayCell( } val shiftLabel = if (shiftKind == ShiftKind.WORK) "班" else "休" val shiftAlpha = if (isCurrentMonth) 1f else 0.38f - Text( - text = shiftLabel, - color = shiftAccentColor.copy(alpha = shiftAlpha), - fontSize = 9.sp, - fontWeight = FontWeight.Bold, - lineHeight = 9.sp, + Box( modifier = Modifier .align(Alignment.TopEnd) .zIndex(1f) .padding(top = 1.dp, end = 2.dp) - ) + .background(MaterialTheme.colorScheme.background, CircleShape) + .padding(horizontal = 3.dp, vertical = 2.dp), + contentAlignment = Alignment.Center + ) { + Text( + text = shiftLabel, + color = shiftAccentColor.copy(alpha = shiftAlpha), + fontSize = 9.sp, + fontWeight = FontWeight.Bold, + lineHeight = 9.sp + ) + } } } }