Tweak some icon colors

This commit is contained in:
MM20
2022-06-18 19:13:00 +02:00
parent 6de89f3f79
commit e8936eb0b4
10 changed files with 34 additions and 31 deletions
@@ -37,9 +37,9 @@ class CalendarEvent(
return StaticLauncherIcon(
foregroundLayer = TextLayer(
text = df.format(startTime),
color = Color.WHITE
color = color
),
backgroundLayer = ColorLayer(getDisplayColor())
backgroundLayer = ColorLayer(color)
)
}
@@ -47,11 +47,6 @@ class CalendarEvent(
val uri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, id)
return Intent(Intent.ACTION_VIEW).setData(uri).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
}
fun getDisplayColor(): Int {
val palette = TonalPalette.fromInt(color)
return palette.tone(70)
}
}
data class UserCalendar(