Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
fix: a playlist with the Mix feature on shows its picture instead of a black header
Vojtěch Škopek59b82990d17f
diff --git a/harness/playlist/main.m b/harness/playlist/main.mindex 3b30a440..bccf04f1 100644--- a/harness/playlist/main.m+++ b/harness/playlist/main.m@@ -504,6 +504,14 @@ static void buildLikedSongs(UIViewController *page, CGFloat W) {wash.clipsToBounds = YES;UIView *gradient = box(wash, _TtC19LegacyUI_ECMCoreKit13GradientView.class, wash.bounds, nil);gradient.backgroundColor = [UIColor colorWithRed:0.5 green:0.1 blue:0.3 alpha:1];+ // The second wash of the plane: a plain view painted the base surface with a gradient of its own in it,+ // drawn after the hero. Spotify keeps it at alpha 0 on an ordinary playlist and raises it with the Mix+ // feature on, where its black covered the picture whole (trees/continuous/1.txt 2026-09-20).+ UIView *mixWash = box(wash, UIView.class, wash.bounds, nil);+ mixWash.backgroundColor = UIColor.blackColor;+ mixWash.alpha = [NSProcessInfo.processInfo.arguments containsObject:@"mixon"] ? 1 : 0;+ UIView *mixGradient = box(mixWash, _TtC19LegacyUI_ECMCoreKit13GradientView.class, CGRectMake(0, 8, 560, 560), nil);+ mixGradient.backgroundColor = [UIColor colorWithRed:0.1 green:0.4 blue:0.2 alpha:1];UIView *safeArea = box(clipping, UIView.class, clipping.bounds, @"_safeAreaView");UIView *contentContainer = box(safeArea, UIView.class, CGRectMake(0, -134, W, 639.33), @"_headerContentContainer");@@ -726,6 +734,11 @@ static void buildLikedSongs(UIViewController *page, CGFloat W) {pinnedGlyph.tintColor);UIView *hit = [page.view hitTest:CGPointMake(CGRectGetMidX(pinned.frame), CGRectGetMidY(pinned.frame)) withEvent:nil];NSLog(@"[harness] pinned more takes the touch: %@", NSStringFromClass(hit.class));+ // The wash over the hero: its gradient concealed and its own black taken off, so the picture shows+ // through whether the Mix feature raised its alpha or not.+ NSLog(@"[harness] the plane's second wash: a=%.2f, paint a=%.0f, gradient %@", mixWash.alpha,+ mixWash.layer.backgroundColor ? CGColorGetAlpha(mixWash.layer.backgroundColor) : 0,+ mixGradient.layer.mask ? @"masked" : @"DRAWN");// The creator line: a tap on the name, nowhere else.UIView *info = nil;for (UIView *v = block; v; v = nil) {diff --git a/tweak/Sources/Redesigned/Playlist/PlaylistHeader.x b/tweak/Sources/Redesigned/Playlist/PlaylistHeader.xindex 8c95677c..76612ce9 100644--- a/tweak/Sources/Redesigned/Playlist/PlaylistHeader.x+++ b/tweak/Sources/Redesigned/Playlist/PlaylistHeader.x@@ -482,6 +482,13 @@ static void applyScrims(UIView *headerRoot) {// Spotify's colour wash goes, so the page's field shows through, and the plane it was drawn on is handed// back: it is where the hero belongs (applyHero).+//+// The wash is a gradient on a plain view of its own, and that view is painted the base surface. Spotify+// keeps it at alpha 0 on an ordinary playlist, so concealing the gradient was enough; with the Mix feature+// turned on it raises the alpha and the view -- opaque black, drawn after the hero -- covered the picture+// whole (device, trees/continuous/1.txt 2026-09-20, issue #53). So the paint comes off everything on the+// plane as well, which is the same thing the field does to the rest of the page. The hero is left alone:+// the picture is drawn in it.static UIView *applyBackground(UIView *layout) {UIView *container = nil;for (UIView *v = layout.superview; v && !container; v = v.superview) {@@ -490,8 +497,15 @@ static UIView *applyBackground(UIView *layout) {}}UIView *plane = container.subviews.firstObject;+ SGRPlaylistHero *hero = objc_getAssociatedObject(plane, &kHeroKey);SGForEachView(container, ^(UIView *v) {- if ([NSStringFromClass(v.class) containsString:@"GradientView"]) conceal(v);+ if (hero && (v == hero || [v isDescendantOfView:hero])) return;+ if ([NSStringFromClass(v.class) containsString:@"GradientView"]) {+ conceal(v);+ return;+ }+ CGColorRef color = v.layer.backgroundColor;+ if (color && SGIsBaseSurface(color)) v.backgroundColor = UIColor.clearColor;});return plane;}