fix: 排班标记添加圆形底,避免与选中圆环重叠
- 将右上角排班 Text 包裹在 Box 中 - Box 添加 CircleShape + 背景色,遮挡选中状态的描边圆环 - 非选中时背景色与 cell 背景一致,视觉上仍是裸文字 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e97909ec34
commit
134fc5a9c6
@ -247,17 +247,23 @@ fun DayCell(
|
|||||||
}
|
}
|
||||||
val shiftLabel = if (shiftKind == ShiftKind.WORK) "班" else "休"
|
val shiftLabel = if (shiftKind == ShiftKind.WORK) "班" else "休"
|
||||||
val shiftAlpha = if (isCurrentMonth) 1f else 0.38f
|
val shiftAlpha = if (isCurrentMonth) 1f else 0.38f
|
||||||
|
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(
|
||||||
text = shiftLabel,
|
text = shiftLabel,
|
||||||
color = shiftAccentColor.copy(alpha = shiftAlpha),
|
color = shiftAccentColor.copy(alpha = shiftAlpha),
|
||||||
fontSize = 9.sp,
|
fontSize = 9.sp,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
lineHeight = 9.sp,
|
lineHeight = 9.sp
|
||||||
modifier = Modifier
|
|
||||||
.align(Alignment.TopEnd)
|
|
||||||
.zIndex(1f)
|
|
||||||
.padding(top = 1.dp, end = 2.dp)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user