fix: 排班标记添加圆形底,避免与选中圆环重叠

- 将右上角排班 Text 包裹在 Box 中
- Box 添加 CircleShape + 背景色,遮挡选中状态的描边圆环
- 非选中时背景色与 cell 背景一致,视觉上仍是裸文字

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
xfy 2026-05-25 10:12:58 +08:00
parent e97909ec34
commit 134fc5a9c6

View File

@ -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
)
}
}
}
}