From 3f4dc5f8666335dae65e0aedd54008e70e93812a Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 26 Sep 2026 17:22:52 +0000 Subject: [PATCH] shadow the starred badge with the icon shape, not a disc Modifier.shadow only takes a Shape, so over artwork the star now draws with a dark copy of the same glyph offset behind it instead of a circular halo. --- .../com/subtracks/ui/components/Components.kt | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/components/Components.kt b/app/src/main/kotlin/com/subtracks/ui/components/Components.kt index 4c87f56a..8aa36f98 100644 --- a/app/src/main/kotlin/com/subtracks/ui/components/Components.kt +++ b/app/src/main/kotlin/com/subtracks/ui/components/Components.kt @@ -13,10 +13,10 @@ import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset 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 @@ -313,15 +313,22 @@ fun StarredBadge( shadow: Boolean = false, ) { if (starred) { - Icon( - imageVector = Icons.Rounded.Star, - contentDescription = "Starred", - tint = MaterialTheme.colorScheme.primary, - modifier = - modifier - .then(if (shadow) Modifier.shadow(2.dp, CircleShape, clip = false) else Modifier) - .size(size), - ) + Box(modifier.size(size)) { + if (shadow) { + Icon( + imageVector = Icons.Rounded.Star, + contentDescription = null, + tint = Color.Black.copy(alpha = 0.5f), + modifier = Modifier.matchParentSize().offset(x = 0.5.dp, y = 1.dp), + ) + } + Icon( + imageVector = Icons.Rounded.Star, + contentDescription = "Starred", + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.matchParentSize(), + ) + } } }