From 6d2d7c83f35376dc7bce7492f882a2f5a1a96d5e Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 14 Jul 2026 07:23:14 +0000 Subject: fix(widget): fix all-day alignment, drop duplicate TODAY, boost label legibility, soften overdue red - AllDayRow now has the same 32dp leading gutter as HourRow's hour-label column, so its color bar lines up with EventBlock's bar in the grid below instead of sitting flush left; also dropped the title's defaultWeight() so the multi-day label sits right after the title instead of being pushed to the far-right edge. - TaskFragmentBlock no longer renders its own "TODAY" sub-header -- it's always inside the already-labeled TODAY section, and Tomorrow's floating tasks never had this redundant label to begin with. - Section headers and hour/time labels bumped from ~30-40% to ~50-60% opacity -- against a home-screen wallpaper the previous values were barely legible. - Overdue task text alpha reduced to 0.75 -- full-opacity bright red read as too alarming. --- .../java/org/terst/doot/widget/ui/DootWidget.kt | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'android/app/src/main/java/org') 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 49b277a..6a25d2f 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 @@ -188,7 +188,7 @@ fun WidgetRoot(items: List, now: Instant, isRefreshing: Boolean, tex Text( "TODAY", style = TextStyle( - color = ColorProvider(Color(0x66FFFFFF)), + color = ColorProvider(Color(0x99FFFFFF)), fontSize = textSize.scaledHeaderSize(11), fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold) ), @@ -231,6 +231,9 @@ fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVari .clickable(actionStartActivity(calendarViewIntent(event.url))), verticalAlignment = Alignment.CenterVertically ) { + // Matches HourRow's 32dp hour-label gutter so this row's color bar lines up + // with EventBlock's bar in the grid below it, instead of sitting flush left. + Spacer(modifier = GlanceModifier.width(32.dp)) Box(modifier = GlanceModifier.width(3.dp).height(16.dp).background(color)) {} Text( text = event.title, @@ -239,7 +242,7 @@ fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVari fontSize = textSize.scaledContentSize(13), fontWeight = textSize.scaledContentWeight(FontWeight.Medium) ), - modifier = GlanceModifier.padding(start = 8.dp).defaultWeight(), + modifier = GlanceModifier.padding(start = 8.dp), maxLines = 1 ) if (label.isNotEmpty()) { @@ -252,6 +255,7 @@ fun AllDayRow(event: WidgetItem, textSize: WidgetTextSize, variant: MultiDayVari fontSize = textSize.scaledContentSize(13), fontWeight = textSize.scaledContentWeight(FontWeight.Medium) ), + modifier = GlanceModifier.padding(start = 4.dp), maxLines = 1 ) } @@ -343,7 +347,7 @@ fun HourRow( Text( text = hourLabel(hour), style = TextStyle( - color = ColorProvider(Color(0x4DFFFFFF)), + color = ColorProvider(Color(0x80FFFFFF)), fontSize = textSize.scaledHeaderSize(10), fontWeight = textSize.scaledHeaderWeight(FontWeight.Normal) ), @@ -414,15 +418,6 @@ fun TaskFragmentBlock(fragment: TaskFragment, textSize: WidgetTextSize) { .fillMaxWidth() .padding(vertical = 2.dp) ) { - Text( - "TODAY", - style = TextStyle( - color = ColorProvider(Color(0x73FFFFFF)), - fontSize = textSize.scaledHeaderSize(9), - fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold) - ), - modifier = GlanceModifier.padding(start = 8.dp, top = 3.dp, bottom = 1.dp) - ) fragment.slots.forEach { slot -> TaskRow(slot.task, textSize) } @@ -489,7 +484,7 @@ fun TaskRow(task: WidgetItem, textSize: WidgetTextSize) { text = task.title, style = TextStyle( color = ColorProvider( - if (task.isOverdue) Color(0xFFF87171) else Color(0xFFDDDDDD.toInt()) + if (task.isOverdue) Color(0xFFF87171).copy(alpha = 0.75f) else Color(0xFFDDDDDD.toInt()) ), fontSize = textSize.scaledContentSize(14), fontWeight = textSize.scaledContentWeight(FontWeight.Normal) @@ -515,7 +510,7 @@ fun TomorrowSection( Text( "TOMORROW", style = TextStyle( - color = ColorProvider(Color(0x66FFFFFF)), + color = ColorProvider(Color(0x99FFFFFF)), fontSize = textSize.scaledHeaderSize(11), fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold) ) @@ -556,7 +551,7 @@ fun TomorrowEventRow(event: WidgetItem, zone: ZoneId, textSize: WidgetTextSize) Text( text = timeLabel, style = TextStyle( - color = ColorProvider(Color(0x4DFFFFFF)), + color = ColorProvider(Color(0x80FFFFFF)), fontSize = textSize.scaledHeaderSize(10), fontWeight = textSize.scaledHeaderWeight(FontWeight.Normal) ), -- cgit v1.2.3