widget: two-height color bar, single-line title with ellipsis

This commit is contained in:
Damocles 2026-04-22 21:41:40 +02:00
parent 7e6f70e22b
commit 1dbd96d961

View file

@ -217,14 +217,14 @@ class AgendaWidget : GlanceAppWidget() {
Spacer(GlanceModifier.width(8.dp)) Spacer(GlanceModifier.width(8.dp))
// color indicator // color indicator - height based on whether there's a second line
Spacer( val hasSecondLine = event.location != null || !event.allDay
Box(
modifier = GlanceModifier modifier = GlanceModifier
.width(3.dp) .size(width = 3.dp, height = if (hasSecondLine) 32.dp else 18.dp)
.height(16.dp)
.cornerRadius(2.dp) .cornerRadius(2.dp)
.background(GlanceTheme.colors.primary), .background(GlanceTheme.colors.primary),
) ) {}
Spacer(GlanceModifier.width(8.dp)) Spacer(GlanceModifier.width(8.dp))
@ -237,7 +237,7 @@ class AgendaWidget : GlanceAppWidget() {
fontSize = 13.sp, fontSize = 13.sp,
fontWeight = FontWeight.Medium, fontWeight = FontWeight.Medium,
), ),
maxLines = 2, maxLines = 1,
) )
if (event.location != null) { if (event.location != null) {
Text( Text(