Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
fix: the artist page's liked row, carousels and See more fade no longer paint black bands over its colour
Vojtěch Škopek134934027f7d
diff --git a/harness/artist/main.m b/harness/artist/main.mindex a758515e..77cb7f6c 100644--- a/harness/artist/main.m+++ b/harness/artist/main.m@@ -145,6 +145,14 @@ static NSArray<NSArray *> *musicList(void) {UILabel *sub = label(element, CGRectMake(height + 8, height / 2 + 2, W - height - 40, 16), @"Shawn Mendes", 12,[UIColor colorWithWhite:1 alpha:0.6], @"EncoreConsumerMobile.View.Granular.Subtitle");sub.font = [UIFont systemFontOfSize:12];+ } else if ([kind isEqualToString:@"Components.UI.HomeCard"]) {+ // A carousel: its own collection painted the AMOLED black, and a page-wide fade, as on the phone.+ element.backgroundColor = UIColor.blackColor;+ UIView *fade = box(element, MockGradientView.class, element.bounds, nil);+ fade.backgroundColor = [UIColor colorWithWhite:0 alpha:0.8];+ UICollectionViewCell *card = [[UICollectionViewCell alloc] initWithFrame:CGRectMake(16, 4, 153, height - 8)];+ card.backgroundColor = UIColor.blackColor;+ [element addSubview:card];} else {UIView *card = box(element, UIView.class, CGRectMake(16, 4, W - 32, height - 8), nil);card.backgroundColor = [UIColor colorWithWhite:0.16 alpha:1];@@ -272,6 +280,11 @@ static NSArray<NSArray *> *musicList(void) {[lines addObject:[NSString stringWithFormat:@"%@ %.0f", name, a.size.height]];}NSLog(@"[harness] Music list: %@", [lines componentsJoinedByString:@" | "]);+ UICollectionViewCell *carousel = (UICollectionViewCell *)[list cellForItemAtIndexPath:[NSIndexPath indexPathForItem:self.source.items.count - 1 inSection:0]];+ UIView *band = carousel.contentView.subviews.firstObject.subviews.firstObject;+ UIView *fade = band.subviews.firstObject;+ UIView *card = band.subviews.lastObject;+ NSLog(@"[harness] carousel bg %@, fade masked %d, card bg %@", band.backgroundColor, fade.layer.mask != nil, card.backgroundColor);NSLog(@"[harness] strip a=%.2f, pages moved %.0f, list bg %@", strip.alpha, pages.transform.ty, list.backgroundColor);});return YES;diff --git a/tweak/Sources/Redesigned/Artist/ArtistSections.x b/tweak/Sources/Redesigned/Artist/ArtistSections.xindex 56193225..50fe6951 100644--- a/tweak/Sources/Redesigned/Artist/ArtistSections.x+++ b/tweak/Sources/Redesigned/Artist/ArtistSections.x@@ -1,4 +1,4 @@-// Artist redesign: the Music list without the artist's videos.+// Artist redesign: the Music list without the artist's videos, and nothing of it painted over the field.//// Tree (trees/clean/artist/05.txt, the Music list top to bottom): Popular, Artist pick, Popular releases and// its Show all, Featuring, Release Countdown, Music videos, Watch more from…, About, Artist playlists, Fans@@ -120,6 +120,23 @@ static void dropHeadingOf(UICollectionView *list, NSIndexPath *path) {dispatch_async(dispatch_get_main_queue(), ^{ [weakList.collectionViewLayout invalidateLayout]; });}+// What a cell of the page paints over the field, cleared: Spotify's base surface, which the redesign's AMOLED+// black has already made black -- the "You liked" row (an Encore ListRow) and every carousel's collection+// (Home_CarouselKit.TouchCancellingCollectionView) sat on black bands (device, trees/continuous/3.txt+// 2026-09-18) -- and the fade Popular's "See more" draws over its last track, a GradientView as wide as the+// page, which the black made a dark band. The repaint hook misses them: the cells are painted before they are+// inside the page. Only what is nearly as wide as the page: a badge's black disc, a card's grey and an+// image's placeholder are their own. The cards of a carousel are cells of their own and are not walked into.+static void clearPaint(UIView *view, UIView *cell, CGFloat wide) {+ if (view != cell && [view isKindOfClass:UICollectionViewCell.class]) return;+ if (view.bounds.size.width >= wide) {+ UIColor *color = view.backgroundColor;+ if (color && SGIsBaseSurface(color.CGColor)) view.backgroundColor = UIColor.clearColor;+ if (!view.layer.mask && [NSStringFromClass(view.class) containsString:@"GradientView"]) view.layer.mask = [CALayer layer];+ }+ for (UIView *sub in view.subviews) clearPaint(sub, cell, wide);+}+static void logOnce(NSString *what) {static NSMutableSet<NSString *> *logged;if (!logged) logged = [NSMutableSet set];@@ -162,8 +179,13 @@ static void logOnce(NSString *what) {// The cell's own passes size the content to the cell again.- (void)layoutSubviews {%orig;+ UICollectionViewCell *cell = (UICollectionViewCell *)self;NSNumber *settled = objc_getAssociatedObject(self, &kSettledKey);- if (settled) settle((UICollectionViewCell *)self, settled.doubleValue);+ if (settled) settle(cell, settled.doubleValue);+ UICollectionView *list = listOf(cell);+ if (list && ![listOf(list) isKindOfClass:UICollectionView.class] && SGRArtistPageOf(cell)) {+ clearPaint(cell, cell, cell.bounds.size.width * 0.75);+ }}- (void)prepareForReuse {