fix widget color bar: use Spacer with background instead of border trick
This commit is contained in:
parent
9b620a2f13
commit
7e6f70e22b
1 changed files with 30 additions and 33 deletions
|
|
@ -217,20 +217,19 @@ class AgendaWidget : GlanceAppWidget() {
|
|||
|
||||
Spacer(GlanceModifier.width(8.dp))
|
||||
|
||||
// color bar as left border - stretches with content automatically
|
||||
Box(
|
||||
// color indicator
|
||||
Spacer(
|
||||
modifier = GlanceModifier
|
||||
.defaultWeight()
|
||||
.background(GlanceTheme.colors.primary)
|
||||
.cornerRadius(4.dp),
|
||||
) {
|
||||
Column(
|
||||
modifier = GlanceModifier
|
||||
.fillMaxWidth()
|
||||
.padding(start = 3.dp)
|
||||
.background(GlanceTheme.colors.widgetBackground),
|
||||
) {
|
||||
Column(modifier = GlanceModifier.padding(start = 8.dp, top = 2.dp, bottom = 2.dp)) {
|
||||
.width(3.dp)
|
||||
.height(16.dp)
|
||||
.cornerRadius(2.dp)
|
||||
.background(GlanceTheme.colors.primary),
|
||||
)
|
||||
|
||||
Spacer(GlanceModifier.width(8.dp))
|
||||
|
||||
// event details
|
||||
Column(modifier = GlanceModifier.defaultWeight()) {
|
||||
Text(
|
||||
text = event.title,
|
||||
style = TextStyle(
|
||||
|
|
@ -253,8 +252,6 @@ class AgendaWidget : GlanceAppWidget() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val timeFormatter = DateTimeFormatter.ofPattern("HH:mm")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue