From eaa938277b9dc00ebde06f3bef950d6fd4516231 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Wed, 30 Sep 2026 18:53:48 +0200 Subject: [PATCH] Soften today's month cell tint (#241) --- .../calendula/ui/month/MonthScreen.kt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt index ec628b9..501efe0 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt @@ -140,6 +140,7 @@ import androidx.compose.ui.layout.LayoutCoordinates import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.compositeOver import androidx.compose.ui.graphics.drawscope.Stroke import androidx.compose.ui.input.pointer.PointerEventPass import androidx.compose.ui.input.pointer.pointerInput @@ -231,6 +232,14 @@ private fun rememberTodayRipple(active: Boolean): Animatable Float): Modifier { if (relativeColumn == null || abs(relativeColumn) > 1) return this @@ -1756,7 +1765,7 @@ private fun SplitDayCell( // the whole cell, which read as a second state on top of the day rather than // as a mark on it — and fought today's own circle when they coincided. val background = when { - isToday && inMonth -> MaterialTheme.colorScheme.primaryContainer + isToday && inMonth -> todayCellColor() inMonth -> MaterialTheme.colorScheme.surfaceContainer else -> MaterialTheme.colorScheme.surfaceContainerLow } @@ -2317,7 +2326,7 @@ private fun MonthWeekRow( .todayRipple(todayCol?.let { col - it }) { ripple.value } .background( color = when { - d == today && inMonth(d) -> MaterialTheme.colorScheme.primaryContainer + d == today && inMonth(d) -> todayCellColor() inMonth(d) -> MaterialTheme.colorScheme.surfaceContainer // A blanked cell draws nothing at all: it is // the gap that shows where the month starts.