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:
@@ -287,42 +287,26 @@ 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
|
||||||
private fun EventRow(event: EventInstance, dark: Boolean, is24Hour: Boolean, dimmed: Boolean) {
|
private fun EventRow(event: EventInstance, dark: Boolean, is24Hour: Boolean, dimmed: Boolean) {
|
||||||
|
|||||||
Reference in New Issue
Block a user