summaryrefslogtreecommitdiff
path: root/android/app
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-14 07:34:01 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-14 07:34:01 +0000
commitdcfb7204d654c98657b0638a569e8ec69bb5d852 (patch)
treec915d506d274189abc972bf7a5a5bd4d3541a171 /android/app
parenta03d7673e7adf9a575c7272b2b528a74b230535e (diff)
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.
Diffstat (limited to 'android/app')
-rw-r--r--android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt16
1 files changed, 11 insertions, 5 deletions
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") {