From 231f6f81ef60888de7309f589b6ebd2634159524 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 18 Jul 2026 18:21:24 +0000 Subject: fix(widget): wrap TomorrowSection in a Column to stop rows overlapping TomorrowSection emitted its divider, header, and every event/task row as top-level siblings with no shared layout container. Since the whole function is composed inside a single LazyColumn item{} slot (one RemoteViews node), nothing told Glance to stack them vertically -- they all rendered on top of each other instead of flowing top-to-bottom. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL --- .../java/org/terst/doot/widget/ui/WidgetRows.kt | 49 ++++++++++++---------- 1 file changed, 28 insertions(+), 21 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 6515131..750dc7b 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 @@ -350,33 +350,40 @@ fun TomorrowSection( zone: ZoneId, textSize: WidgetTextSize ) { - Box(modifier = GlanceModifier.fillMaxWidth().height(1.dp).padding(vertical = 4.dp).background(Color(0x1AFFFFFF))) {} + // This whole section renders inside a single LazyColumn `item { }` slot + // (see DootWidget.kt), which composes to one RemoteViews node -- without + // an explicit Column wrapping the divider/header/rows below, they have + // no shared vertical-flow container and all stack at the same position + // instead of flowing top-to-bottom. + Column(modifier = GlanceModifier.fillMaxWidth()) { + Box(modifier = GlanceModifier.fillMaxWidth().height(1.dp).padding(vertical = 4.dp).background(Color(0x1AFFFFFF))) {} - Row(modifier = GlanceModifier.fillMaxWidth().padding(top = 6.dp, bottom = 2.dp)) { - Text( - "TOMORROW", - style = TextStyle( - color = ColorProvider(Color(0x99FFFFFF)), - fontSize = textSize.scaledHeaderSize(11), - fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold) + Row(modifier = GlanceModifier.fillMaxWidth().padding(top = 6.dp, bottom = 2.dp)) { + Text( + "TOMORROW", + style = TextStyle( + color = ColorProvider(Color(0x99FFFFFF)), + fontSize = textSize.scaledHeaderSize(11), + fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold) + ) ) - ) - } + } - allDayEvents.forEach { AllDayRow(it, textSize) } - multiDayEvents.forEach { (item, variant) -> AllDayRow(item, textSize, variant) } + allDayEvents.forEach { AllDayRow(it, textSize) } + multiDayEvents.forEach { (item, variant) -> AllDayRow(item, textSize, variant) } - items.forEach { item -> - val isPast = false - if (item.type == "event") { - TomorrowEventRow(item, zone, textSize) - } else { - TaskRow(item, textSize) + items.forEach { item -> + val isPast = false + if (item.type == "event") { + TomorrowEventRow(item, zone, textSize) + } else { + TaskRow(item, textSize) + } } - } - fragments.forEach { frag -> - frag.slots.forEach { slot -> TaskRow(slot.task, textSize) } + fragments.forEach { frag -> + frag.slots.forEach { slot -> TaskRow(slot.task, textSize) } + } } } -- cgit v1.2.3