summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-14 06:08:21 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-16 02:43:18 +0000
commit12e966bbb2a17cdd613dfff839383fa92f4d10f2 (patch)
tree25ddfe9206e371a3136610f4bc02dde24b44e342 /android
parenta5e71e92c28ebcb4a9c22cb83349945c5dae69de (diff)
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.
Diffstat (limited to 'android')
-rw-r--r--android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt18
1 files changed, 16 insertions, 2 deletions
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<WidgetItem>, 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
+ )
+ }
}
}