Compare commits

..
2 changed files with 34 additions and 31 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).copy(alpha = 1f)), .background(Color(event.calendarColor)),
) )
Spacer(Modifier.width(12.dp)) Spacer(Modifier.width(12.dp))

View file

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