Use primaryContainer colors when today is also selected
Distinguish the selected-today state from regular selection by using primaryContainer/onPrimaryContainer instead of primary/onPrimary, providing a softer visual treatment for the combined state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
de8cb4334b
commit
bacc2bc8dc
@ -37,6 +37,7 @@ fun DayCell(
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
val contentColor = when {
|
||||
isSelected && isToday -> MaterialTheme.colorScheme.onPrimaryContainer
|
||||
isSelected -> MaterialTheme.colorScheme.onPrimary
|
||||
isToday -> MaterialTheme.colorScheme.primary
|
||||
!isCurrentMonth -> MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f)
|
||||
@ -49,6 +50,7 @@ fun DayCell(
|
||||
.clip(CircleShape)
|
||||
.then(
|
||||
when {
|
||||
isSelected && isToday -> Modifier.background(MaterialTheme.colorScheme.primaryContainer)
|
||||
isSelected -> Modifier.background(MaterialTheme.colorScheme.primary)
|
||||
isToday -> Modifier.border(BorderStroke(1.5.dp, MaterialTheme.colorScheme.primary), CircleShape)
|
||||
else -> Modifier
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user