fix(widget): keep the empty-today line plain, not a card

The agenda widget's event rows are plain (a colour stripe + text, no card), so
the rounded "No more events today" surface looked out of place. Render it as a
muted line indented to the event titles instead, matching the widget's style.
The in-app agenda keeps its coffee-cup card, where event rows are cards too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 19:15:51 +02:00
parent 396a5610aa
commit e73148dc6c

View File

@@ -287,41 +287,25 @@ private fun DayHeaderRow(date: LocalDate, today: LocalDate) {
} }
/** /**
* A card under an anchored, event-less today (#35) — echoing the widget's * "No more events today" under an anchored, event-less today (#35). Kept plain —
* full-empty message ("You're all caught up" here becomes "No more events * a muted line indented to the event titles — since the widget's event rows are
* today") in a rounded surface so today's slot never looks like a bare header. * plain too (a stripe + text, not cards), so a card here would look out of place.
*/ */
@Composable @Composable
private fun PlaceholderRow(date: LocalDate) { private fun PlaceholderRow(date: LocalDate) {
val context = androidx.glance.LocalContext.current val context = androidx.glance.LocalContext.current
Box( Text(
text = context.getString(R.string.agenda_no_more_today),
style = TextStyle(color = GlanceTheme.colors.onSurfaceVariant, fontSize = 14.sp),
modifier = GlanceModifier modifier = GlanceModifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 4.dp, vertical = 4.dp) .padding(start = 19.dp, end = 8.dp, top = 2.dp, bottom = 6.dp)
.clickable( .clickable(
actionStartActivity( actionStartActivity(
MainActivity.openDateIntent(context, date, CalendarView.Agenda), MainActivity.openDateIntent(context, date, CalendarView.Agenda),
), ),
), ),
contentAlignment = Alignment.Center, )
) {
Box(
modifier = GlanceModifier
.fillMaxWidth()
.background(GlanceTheme.colors.surfaceVariant)
.cornerRadius(16.dp)
.padding(vertical = 18.dp, horizontal = 12.dp),
contentAlignment = Alignment.Center,
) {
Text(
text = context.getString(R.string.agenda_no_more_today),
style = TextStyle(
color = GlanceTheme.colors.onSurfaceVariant,
fontSize = 14.sp,
),
)
}
}
} }
@Composable @Composable