Compare commits

...
Author SHA1 Message Date
Damocles
7e6f70e22b fix widget color bar: use Spacer with background instead of border trick 2026-04-22 21:36:32 +02:00
Damocles
9b620a2f13 force full opacity on calendar color bar 2026-04-22 21:34:57 +02:00
2 changed files with 31 additions and 34 deletions

View file

@ -187,7 +187,7 @@ private fun EventCard(event: AgendaEvent) {
.width(4.dp) .width(4.dp)
.fillMaxHeight() .fillMaxHeight()
.clip(RoundedCornerShape(2.dp)) .clip(RoundedCornerShape(2.dp))
.background(Color(event.calendarColor)), .background(Color(event.calendarColor).copy(alpha = 1f)),
) )
Spacer(Modifier.width(12.dp)) Spacer(Modifier.width(12.dp))

View file

@ -217,40 +217,37 @@ class AgendaWidget : GlanceAppWidget() {
Spacer(GlanceModifier.width(8.dp)) Spacer(GlanceModifier.width(8.dp))
// color bar as left border - stretches with content automatically // color indicator
Box( Spacer(
modifier = GlanceModifier modifier = GlanceModifier
.defaultWeight() .width(3.dp)
.background(GlanceTheme.colors.primary) .height(16.dp)
.cornerRadius(4.dp), .cornerRadius(2.dp)
) { .background(GlanceTheme.colors.primary),
Column( )
modifier = GlanceModifier
.fillMaxWidth() Spacer(GlanceModifier.width(8.dp))
.padding(start = 3.dp)
.background(GlanceTheme.colors.widgetBackground), // event details
) { Column(modifier = GlanceModifier.defaultWeight()) {
Column(modifier = GlanceModifier.padding(start = 8.dp, top = 2.dp, bottom = 2.dp)) { Text(
Text( text = event.title,
text = event.title, style = TextStyle(
style = TextStyle( color = GlanceTheme.colors.onSurface,
color = GlanceTheme.colors.onSurface, fontSize = 13.sp,
fontSize = 13.sp, fontWeight = FontWeight.Medium,
fontWeight = FontWeight.Medium, ),
), maxLines = 2,
maxLines = 2, )
) if (event.location != null) {
if (event.location != null) { Text(
Text( text = event.location,
text = event.location, style = TextStyle(
style = TextStyle( color = GlanceTheme.colors.onSurfaceVariant,
color = GlanceTheme.colors.onSurfaceVariant, fontSize = 11.sp,
fontSize = 11.sp, ),
), maxLines = 1,
maxLines = 1, )
)
}
}
} }
} }
} }