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,19 +217,20 @@ 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()) { ) {
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(
@ -252,6 +253,8 @@ class AgendaWidget : GlanceAppWidget() {
} }
} }
} }
}
}
companion object { companion object {
private val timeFormatter = DateTimeFormatter.ofPattern("HH:mm") private val timeFormatter = DateTimeFormatter.ofPattern("HH:mm")