From 12e966bbb2a17cdd613dfff839383fa92f4d10f2 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 14 Jul 2026 06:08:21 +0000 Subject: fix(widget): render multi-day starts/ends label at full opacity The label was concatenated into the title string, inheriting its 0.9 alpha. Split into its own Text at full opacity, matching EventBlock's treatment of upcoming (non-past) events. --- .../main/java/org/terst/doot/widget/ui/DootWidget.kt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'android') diff --git a/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt b/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt index a7b09b4..49b277a 100644 --- a/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt +++ b/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt @@ -223,6 +223,7 @@ fun WidgetRoot(items: List, now: Instant, isRefreshing: Boolean, tex @Composable fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVariant = MultiDayVariant.NONE) { val color = sourceColor(event.source) + val label = multiDayLabel(event, variant) Row( modifier = GlanceModifier .fillMaxWidth() @@ -232,15 +233,28 @@ fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVari ) { Box(modifier = GlanceModifier.width(3.dp).height(16.dp).background(color)) {} Text( - text = event.title + multiDayLabel(event, variant), + text = event.title, style = TextStyle( color = ColorProvider(Color.White.copy(alpha = 0.9f)), fontSize = textSize.scaledContentSize(13), fontWeight = textSize.scaledContentWeight(FontWeight.Medium) ), - modifier = GlanceModifier.padding(start = 8.dp), + modifier = GlanceModifier.padding(start = 8.dp).defaultWeight(), maxLines = 1 ) + if (label.isNotEmpty()) { + Text( + // Full opacity, matching EventBlock's upcoming (non-past) events -- + // the label is time-relevant info, not secondary chrome. + text = label, + style = TextStyle( + color = ColorProvider(Color.White.copy(alpha = 1f)), + fontSize = textSize.scaledContentSize(13), + fontWeight = textSize.scaledContentWeight(FontWeight.Medium) + ), + maxLines = 1 + ) + } } } -- cgit v1.2.3