From 8d8c8be2a8a9cfafa570e7d47189a442f4bd9240 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 26 Sep 2026 05:11:55 +0000 Subject: [PATCH] address review: share one scroll origin for the artist bar and gradient heroBarColor was given the raw content scroll while HeroGradient used the image-bottom anchor, so an opaque bar did not match the background it covered. Both now use scrollPx - imageHeightPx. Also add the first row gap the scroll estimate was missing. --- .../kotlin/com/subtracks/ui/library/ArtistDetailScreen.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/library/ArtistDetailScreen.kt b/app/src/main/kotlin/com/subtracks/ui/library/ArtistDetailScreen.kt index 853787bb..f1aeaa03 100644 --- a/app/src/main/kotlin/com/subtracks/ui/library/ArtistDetailScreen.kt +++ b/app/src/main/kotlin/com/subtracks/ui/library/ArtistDetailScreen.kt @@ -172,7 +172,7 @@ fun ArtistDetailScreen( if (index <= 0) { offset } else { - imageHeightPx + (albumHeightPx + albumRowGapPx) * ((index - 1) / 2) + offset + imageHeightPx + albumRowGapPx + (albumHeightPx + albumRowGapPx) * ((index - 1) / 2) + offset } } } @@ -195,10 +195,11 @@ fun ArtistDetailScreen( BoxWithConstraints(modifier.fillMaxSize().background(Color.Black)) { val screenHeightPx = with(density) { maxHeight.toPx() } val barHeightPx = with(density) { barHeight.toPx() } - val barColor = heroBarColor(effectiveArtwork, scrollPx, barHeightPx, screenHeightPx) + val gradientScrollPx = scrollPx - imageHeightPx + val barColor = heroBarColor(effectiveArtwork, gradientScrollPx, barHeightPx, screenHeightPx) HeroGradient( colors = effectiveArtwork, - scrollPx = { scrollPx - imageHeightPx }, + scrollPx = { gradientScrollPx }, modifier = Modifier.fillMaxSize(), ) LazyVerticalGrid(