From da1c6f37d8fe442b463b6fed41a4d6025afca025 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 26 Sep 2026 03:53:46 +0000 Subject: [PATCH] tint the filled star with the primary colour --- .../com/subtracks/ui/components/ItemContextMenu.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/components/ItemContextMenu.kt b/app/src/main/kotlin/com/subtracks/ui/components/ItemContextMenu.kt index 36ef9637..6335c729 100644 --- a/app/src/main/kotlin/com/subtracks/ui/components/ItemContextMenu.kt +++ b/app/src/main/kotlin/com/subtracks/ui/components/ItemContextMenu.kt @@ -232,7 +232,11 @@ private fun StarItem( ) { var starred by remember(current) { mutableStateOf(current) } val scope = rememberCoroutineScope() - MenuItem(starIcon(starred), starLabel(starred)) { + MenuItem( + starIcon(starred), + starLabel(starred), + tint = if (starred == null) Color.Unspecified else MaterialTheme.colorScheme.primary, + ) { val previous = starred val starring = previous == null starred = if (starring) System.currentTimeMillis() else null @@ -246,11 +250,12 @@ private fun StarItem( private fun MenuItem( icon: ImageVector, label: String, + tint: Color = Color.Unspecified, onClick: () -> Unit, ) { ListItem( headlineContent = { Text(label) }, - leadingContent = { Icon(icon, contentDescription = null) }, + leadingContent = { Icon(icon, contentDescription = null, tint = tint) }, colors = ListItemDefaults.colors(containerColor = Color.Transparent), modifier = Modifier.clickable(onClick = onClick), )