give the starred badge a shadow when it sits over artwork

Over a cover the primary star was hard to read, so the album grid and artist album cells now
draw it with a small circular shadow.
This commit is contained in:
austinried
2026-10-04 00:29:59 +00:00
parent 7af87d63d9
commit 73db0681b5
3 changed files with 8 additions and 1 deletions
@@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Star
@@ -309,13 +310,17 @@ fun StarredBadge(
starred: Boolean,
modifier: Modifier = Modifier,
size: Dp = 14.dp,
shadow: Boolean = false,
) {
if (starred) {
Icon(
imageVector = Icons.Rounded.Star,
contentDescription = "Starred",
tint = MaterialTheme.colorScheme.primary,
modifier = modifier.size(size),
modifier =
modifier
.then(if (shadow) Modifier.shadow(2.dp, CircleShape, clip = false) else Modifier)
.size(size),
)
}
}
@@ -105,6 +105,7 @@ fun AlbumsContent(
StarredBadge(
starred = album.starred != null,
size = 16.dp,
shadow = true,
modifier = Modifier.align(Alignment.TopEnd).padding(6.dp),
)
}
@@ -287,6 +287,7 @@ fun ArtistDetailScreen(
StarredBadge(
starred = album.starred != null,
size = 16.dp,
shadow = true,
modifier = Modifier.align(Alignment.TopEnd).padding(6.dp),
)
}