add option to hide folder title and folder background
This commit is contained in:
		
							
								
								
									
										31
									
								
								Tweak.x
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								Tweak.x
									
									
									
									
									
								
							@ -26,6 +26,8 @@ static BOOL statusBarShowTimeLS;
 | 
				
			|||||||
static BOOL hideLabels;
 | 
					static BOOL hideLabels;
 | 
				
			||||||
static BOOL hideCarPlayLabels;
 | 
					static BOOL hideCarPlayLabels;
 | 
				
			||||||
static BOOL hideFolderBadges;
 | 
					static BOOL hideFolderBadges;
 | 
				
			||||||
 | 
					static BOOL hideFolderTitle;
 | 
				
			||||||
 | 
					static BOOL hideFolderBG;
 | 
				
			||||||
//static BOOL hideStatusBarLS;
 | 
					//static BOOL hideStatusBarLS;
 | 
				
			||||||
static BOOL hideCCGrabber;
 | 
					static BOOL hideCCGrabber;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -38,6 +40,8 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
 | 
				
			|||||||
    NSNumber *eHideLabels = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLabels" inDomain:nsDomainString];
 | 
					    NSNumber *eHideLabels = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLabels" inDomain:nsDomainString];
 | 
				
			||||||
    NSNumber *eHideCarPlayLabels = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCarPlayLabels" inDomain:nsDomainString];
 | 
					    NSNumber *eHideCarPlayLabels = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCarPlayLabels" inDomain:nsDomainString];
 | 
				
			||||||
    NSNumber *eHideFolderBadges = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBadges" inDomain:nsDomainString];
 | 
					    NSNumber *eHideFolderBadges = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBadges" inDomain:nsDomainString];
 | 
				
			||||||
 | 
					    NSNumber *eHideFolderTitle = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderTitle" inDomain:nsDomainString];
 | 
				
			||||||
 | 
					    NSNumber *eHideFolderBG = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBG" inDomain:nsDomainString];
 | 
				
			||||||
    //NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString];
 | 
					    //NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString];
 | 
				
			||||||
    NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString];
 | 
					    NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -49,6 +53,8 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
 | 
				
			|||||||
    hideLabels = (eHideLabels) ? [eHideLabels boolValue]:NO;
 | 
					    hideLabels = (eHideLabels) ? [eHideLabels boolValue]:NO;
 | 
				
			||||||
    hideCarPlayLabels = (eHideCarPlayLabels) ? [eHideCarPlayLabels boolValue]:NO;
 | 
					    hideCarPlayLabels = (eHideCarPlayLabels) ? [eHideCarPlayLabels boolValue]:NO;
 | 
				
			||||||
    hideFolderBadges = (eHideFolderBadges) ? [eHideFolderBadges boolValue]:NO;
 | 
					    hideFolderBadges = (eHideFolderBadges) ? [eHideFolderBadges boolValue]:NO;
 | 
				
			||||||
 | 
					    hideFolderTitle = (eHideFolderTitle) ? [eHideFolderTitle boolValue]:NO;
 | 
				
			||||||
 | 
					    hideFolderBG = (eHideFolderBG) ? [eHideFolderBG boolValue]:NO;
 | 
				
			||||||
    //hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO;
 | 
					    //hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO;
 | 
				
			||||||
    hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO;
 | 
					    hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -180,6 +186,31 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
 | 
				
			|||||||
%end
 | 
					%end
 | 
				
			||||||
// NO LS BATTERY END //
 | 
					// NO LS BATTERY END //
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SHOW FOLDER TITLE START //
 | 
				
			||||||
 | 
					%hook SBFloatyFolderView
 | 
				
			||||||
 | 
					-(BOOL)_showsTitle {
 | 
				
			||||||
 | 
					    if (enabled && hideFolderTitle) {
 | 
				
			||||||
 | 
					        return NO;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else {
 | 
				
			||||||
 | 
					        return %orig;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					%end
 | 
				
			||||||
 | 
					// SHOW FOLDER TITLE END //
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// HIDE FOLDER BACKGROUND START //
 | 
				
			||||||
 | 
					%hook SBFolderBackgroundView
 | 
				
			||||||
 | 
					    -(void)layoutSubviews {
 | 
				
			||||||
 | 
					        %orig;
 | 
				
			||||||
 | 
					        if (enabled && hideFolderBG) {
 | 
				
			||||||
 | 
					            UIImageView * tintView = MSHookIvar<UIImageView *>(self, "_tintView");
 | 
				
			||||||
 | 
					            tintView.alpha = 0; 
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					%end
 | 
				
			||||||
 | 
					// HIDE FOLDER BACKGROUND END //
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%end // end universal group
 | 
					%end // end universal group
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// stuff that only works on iOS 13
 | 
					// stuff that only works on iOS 13
 | 
				
			||||||
 | 
				
			|||||||
@ -122,6 +122,34 @@
 | 
				
			|||||||
			<key>PostNotification</key>
 | 
								<key>PostNotification</key>
 | 
				
			||||||
			<string>com.yaypixxo.kage/preferences.changed</string>
 | 
								<string>com.yaypixxo.kage/preferences.changed</string>
 | 
				
			||||||
		</dict>
 | 
							</dict>
 | 
				
			||||||
 | 
							<dict>
 | 
				
			||||||
 | 
								<key>cell</key>
 | 
				
			||||||
 | 
								<string>PSSwitchCell</string>
 | 
				
			||||||
 | 
								<key>default</key>
 | 
				
			||||||
 | 
								<false/>
 | 
				
			||||||
 | 
								<key>defaults</key>
 | 
				
			||||||
 | 
								<string>com.yaypixxo.kage</string>
 | 
				
			||||||
 | 
								<key>key</key>
 | 
				
			||||||
 | 
								<string>hideFolderTitle</string>
 | 
				
			||||||
 | 
								<key>label</key>
 | 
				
			||||||
 | 
								<string>Hide Folder Titles</string>
 | 
				
			||||||
 | 
								<key>PostNotification</key>
 | 
				
			||||||
 | 
								<string>com.yaypixxo.kage/preferences.changed</string>
 | 
				
			||||||
 | 
							</dict>
 | 
				
			||||||
 | 
							<dict>
 | 
				
			||||||
 | 
								<key>cell</key>
 | 
				
			||||||
 | 
								<string>PSSwitchCell</string>
 | 
				
			||||||
 | 
								<key>default</key>
 | 
				
			||||||
 | 
								<false/>
 | 
				
			||||||
 | 
								<key>defaults</key>
 | 
				
			||||||
 | 
								<string>com.yaypixxo.kage</string>
 | 
				
			||||||
 | 
								<key>key</key>
 | 
				
			||||||
 | 
								<string>hideFolderBG</string>
 | 
				
			||||||
 | 
								<key>label</key>
 | 
				
			||||||
 | 
								<string>Hide Folder Background</string>
 | 
				
			||||||
 | 
								<key>PostNotification</key>
 | 
				
			||||||
 | 
								<string>com.yaypixxo.kage/preferences.changed</string>
 | 
				
			||||||
 | 
							</dict>
 | 
				
			||||||
		<!--<dict>
 | 
							<!--<dict>
 | 
				
			||||||
			<key>cell</key>
 | 
								<key>cell</key>
 | 
				
			||||||
			<string>PSSwitchCell</string>
 | 
								<string>PSSwitchCell</string>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user