Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
feat: Appearance is a page of its own
My-Name-Is-Jeffa08a787287b4
diff --git a/docs/tweaks.md b/docs/tweaks.mdindex d410ecc7..53054faa 100644--- a/docs/tweaks.md+++ b/docs/tweaks.md@@ -335,7 +335,7 @@ Redesigned:App:ModSettings.x the root page and the rows that open it from Spotify's settings and the side drawer- Pages.m the Appearance card with Redesigned UI, the Player and Lyrics pages, which Navbar page opens+ Pages.m the Appearance page with Redesigned UI, the Player and Lyrics pages, which Navbar page opensAbout/ the update check against the repo's GitHub Releases, the Updates page it fills (the state, andthe changelog of every release newer than the build, a line per commit) and the sheet a newerrelease brings up on its own a few seconds after Spotify opens, once per release; backup, the@@ -349,7 +349,7 @@ which makes every unset switch read off, so a reset is stock Spotify whatever swA hook reads its switch when it runs (`SGEnabled`, `SGHidden`, `SGFlag` from Core/SGPrefs.h), so achange shows after Spotify restarts; the tab editor on the Navbar page is the exception and applies as soon as the bar laysout again, as are the Home gradient's colour, strength and height, but not the switch that turns it on, and Vibrations-and Live Activity. The root page in `App/ModSettings.x` holds the Appearance card and links the page of each part of Spotify, and only the stored look's.+and Live Activity. The root page in `App/ModSettings.x` links the Appearance page and the page of each part of Spotify, and only the stored look's.## Make targetsdiff --git a/tweak/Sources/App/ModSettings.x b/tweak/Sources/App/ModSettings.xindex b8c6f496..dba1ec54 100644--- a/tweak/Sources/App/ModSettings.x+++ b/tweak/Sources/App/ModSettings.x@@ -1,5 +1,5 @@// Settings: a Mod Settings row at the end of Spotify's settings list opens the mod's own page: the-// Appearance card with Redesigned UI, then a page per part of Spotify, each holding what that part+// Appearance page with Redesigned UI, then a page per part of Spotify, each holding what that part// offers in the stored look (App/Pages.m: Navbar, Player, and Home & Library for the native look), Audio// effects (Shared/AudioEffects, in either look and applying straight away), Premium, ads & privacy// and Labs, All flags, a searchable list of every flag with an override per flag, and Mod, the@@ -42,6 +42,8 @@ static UIViewController *modSettingsPage(void) {// that no switch can put right, and it is worth reading before anything else.SGModRow *signing = SGSigningWarningRow();if (signing) [sections addObject:SGSection(nil, @[signing])];+ // Appearance opens a page of its own, on a card of its own, so the parts below stay one tap from the top.+ [sections addObject:SGSection(nil, @[pageRow(@"Appearance", @"paintpalette", ^UIViewController *{ return SGAppearancePage(); })])];SGModRow *mod = pageRow(@"Mod", @"info.circle", ^UIViewController *{ return SGAboutPage(); });mod.value = ^NSString *{ return @(SG_VERSION); };// The audio effects work on the sound, so both looks have them, with what they are doing beside the chevron.@@ -69,7 +71,6 @@ static UIViewController *modSettingsPage(void) {if (!SGRedesignedUIStored()) [parts addObject:pageRow(@"Home & Library", @"house", ^UIViewController *{ return SGHomeSettingsPage(); })];else [parts addObject:pageRow(@"Albums & artists", @"square.stack", ^UIViewController *{ return SGRAlbumSettingsPage(); })];[sections addObjectsFromArray:@[- SGAppearanceSection(),SGSection(nil, parts),SGSection(nil, @[pageRow(@"Premium, ads & privacy", @"crown", ^UIViewController *{ return SGAdsSettingsPage(); }),diff --git a/tweak/Sources/App/Pages.h b/tweak/Sources/App/Pages.hindex 635853b9..ce7afecb 100644--- a/tweak/Sources/App/Pages.h+++ b/tweak/Sources/App/Pages.h@@ -3,13 +3,11 @@// Redesigned UI switch, so a page opened after flipping it shows what the restart will bring.#import <UIKit/UIKit.h>-@class SGModSection;-// Redesigned UI, the one switch between the two looks, and what its ⓘ reads out.void SGSetRedesignedUI(BOOL on);extern NSString *const SGRedesignedUIInfo;-SGModSection *SGAppearanceSection(void); // the Appearance card at the top of Mod Settings+UIViewController *SGAppearancePage(void); // Redesigned UI, the accent, the font and the app iconUIViewController *SGPlayerSettingsPage(void);UIViewController *SGLyricsSettingsPage(void); // with Sing (Shared/Sing) on itUIViewController *SGNavbarPage(void); // the tab editor of whichever look is storeddiff --git a/tweak/Sources/App/Pages.m b/tweak/Sources/App/Pages.mindex 0c289fe6..e5b862ce 100644--- a/tweak/Sources/App/Pages.m+++ b/tweak/Sources/App/Pages.m@@ -42,7 +42,7 @@ static void offerRestart(BOOL on) {}// Below iOS 26 the row is not a switch: Liquid Glass is the redesign, and the system draws it from-// that version on, so the row reads out what is missing and the card carries the native look's rows alone.+// that version on, so the row reads out what is missing and the page carries the native look's rows alone.static SGModRow *unavailableRow(void) {SGModRow *row = SGStatActionRow(@"Redesigned UI", nil, ^NSString *{ return @"Needs iOS 26"; }, ^{UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Redesigned UI"@@ -54,28 +54,28 @@ static SGModRow *unavailableRow(void) {return SGWithSymbol(row, @"sparkles");}-SGModSection *SGAppearanceSection(void) {- // Fonts.x works under either look on any iOS, so the row is on the card either way.- SGModRow *font = SGWithSymbol(SGChoiceRow(@"Font", nil, SGKeyAppFont, SGAppFontNames(), SGAppFontSpotify), @"textformat");- if (!SGRedesignAvailable()) {- NSMutableArray<SGModRow *> *rows = [NSMutableArray arrayWithObject:unavailableRow()];- [rows addObjectsFromArray:SGNativeAppearanceRows()];- [rows addObject:font];- if (SGAppIconRow()) [rows addObject:SGAppIconRow()];- return SGNotedSection(@"Appearance", rows, @"Changes apply after you restart Spotify.");+// Redesigned UI, then the stored look's own rows (below iOS 26 that is always the native look's), then the+// font and the app icon, which work under either look on any iOS.+UIViewController *SGAppearancePage(void) {+ SGModRow *look = unavailableRow();+ if (SGRedesignAvailable()) {+ SGModRow *redesign = SGOptionRow(@"Redesigned UI", nil, SGKeyRedesign);+ redesign.glows = YES;+ redesign.info = SGRedesignedUIInfo;+ redesign.changed = ^(BOOL on) {+ SGSetRedesignedUI(on);+ offerRestart(on);+ };+ look = SGWithSymbol(redesign, @"sparkles");}- SGModRow *redesign = SGOptionRow(@"Redesigned UI", nil, SGKeyRedesign);- redesign.glows = YES;- redesign.info = SGRedesignedUIInfo;- redesign.changed = ^(BOOL on) {- SGSetRedesignedUI(on);- offerRestart(on);- };- NSMutableArray<SGModRow *> *rows = [NSMutableArray arrayWithObject:SGWithSymbol(redesign, @"sparkles")];- [rows addObjectsFromArray:SGRedesignedUIStored() ? SGRAppearanceRows() : SGNativeAppearanceRows()];- [rows addObject:font];- if (SGAppIconRow()) [rows addObject:SGAppIconRow()];- return SGNotedSection(@"Appearance", rows, @"Changes apply after you restart Spotify.");+ NSMutableArray<SGModRow *> *everywhere = [NSMutableArray arrayWithObject:SGWithSymbol(SGChoiceRow(@"Font", nil, SGKeyAppFont, SGAppFontNames(), SGAppFontSpotify), @"textformat")];+ SGModRow *icon = SGAppIconRow();+ if (icon) [everywhere addObject:icon];+ return [[SGModPage alloc] initWithTitle:@"Appearance" intro:SGRestartNote sections:@[+ SGSection(nil, @[look]),+ SGSection(nil, SGRedesignedUIStored() ? SGRAppearanceRows() : SGNativeAppearanceRows()),+ SGSection(nil, everywhere),+ ] footer:nil];}UIViewController *SGNavbarPage(void) {