From dcfb7204d654c98657b0638a569e8ec69bb5d852 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 14 Aug 2026 07:34:01 +0000 Subject: Fix tomorrow's all-day events using the wrong text color TomorrowSection de-emphasizes every other row to palette.textSecondary, but AllDayRow had no titleColor parameter and always rendered at palette.textPrimary -- so all-day/multi-day items (like a birthday) stayed bright while every timed event and task around them dimmed. AllDayRow now takes a titleColor (defaulting to textPrimary, which keeps today's section unchanged), and TomorrowSection passes textSecondary like it already does for TimeLabeledEventRow/TaskRow. --- .../src/main/java/org/terst/doot/widget/ui/WidgetRows.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'android/app') diff --git a/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt b/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt index a5e9d26..a2efef2 100644 --- a/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt +++ b/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt @@ -113,7 +113,13 @@ fun calendarViewIntent(url: String): Intent = } @Composable -fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVariant = MultiDayVariant.NONE, palette: WidgetPalette) { +fun AllDayRow( + event: WidgetItem, + textSize: WidgetTextSize, + variant: MultiDayVariant = MultiDayVariant.NONE, + palette: WidgetPalette, + titleColor: Color = palette.textPrimary +) { val label = multiDayLabel(event, variant) Row( modifier = GlanceModifier @@ -128,7 +134,7 @@ fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVari ShadowedText( text = event.title, style = TextStyle( - color = ColorProvider(palette.textPrimary), + color = ColorProvider(titleColor), fontSize = textSize.scaledContentSize(13), fontWeight = textSize.scaledContentWeight(FontWeight.Medium) ), @@ -142,7 +148,7 @@ fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVari // the label is time-relevant info, not secondary chrome. text = label, style = TextStyle( - color = ColorProvider(palette.textPrimary), + color = ColorProvider(titleColor), fontSize = textSize.scaledContentSize(13), fontWeight = textSize.scaledContentWeight(FontWeight.Medium) ), @@ -483,8 +489,8 @@ fun TomorrowSection( ) } - allDayEvents.forEach { AllDayRow(it, textSize, palette = palette) } - multiDayEvents.forEach { (item, variant) -> AllDayRow(item, textSize, variant, palette) } + allDayEvents.forEach { AllDayRow(it, textSize, palette = palette, titleColor = palette.textSecondary) } + multiDayEvents.forEach { (item, variant) -> AllDayRow(item, textSize, variant, palette, titleColor = palette.textSecondary) } items.forEach { item -> if (item.type == "event") { -- cgit v1.2.3