diff --git a/Headers.h b/Headers.h index c5a3c83..f3cfd70 100644 --- a/Headers.h +++ b/Headers.h @@ -2,6 +2,7 @@ #import #import +// dock bg @interface _UIBackdropView : UIView {} @end @@ -9,8 +10,14 @@ @property (nonatomic, retain) _UIBackdropView * backgroundView; @end +// corner radius @interface _UIRootWindow : UIView @property (setter=_setContinuousCornerRadius:, nonatomic) double _continuousCornerRadius; - (double)_continuousCornerRadius; - (void)_setContinuousCornerRadius:(double)arg1; @end + +// icon labels +@interface SBIconView : UIView + @property (assign,nonatomic) double iconLabelAlpha; +@end diff --git a/Tweak.x b/Tweak.x index 090dc0e..a247592 100644 --- a/Tweak.x +++ b/Tweak.x @@ -82,3 +82,53 @@ return; } %end + +//ICON LABELS + +%hook SBIconView +- (void)_applyIconLabelAlpha:(double)arg1 { + NSObject *object = [[NSObject alloc] init]; + BOOL isSettingOn = [object isSettingOn:@"iconlabels"]; + + if(isSettingOn) { + arg1 = 0; + } + + else { + arg1 = 1; + } + + %orig(arg1); +} + +- (void)layoutSubviews { + %orig; + + NSObject *object = [[NSObject alloc] init]; + BOOL isSettingOn = [object isSettingOn:@"iconlabels"]; + + if (isSettingOn) { + self.iconLabelAlpha = 0; + } + + else { + self.iconLabelAlpha = 1; + } +} +%end + +%hook SBIconZoomAnimator +- (void)_applyLabelAlphaFraction:(double)arg1 { + NSObject *object = [[NSObject alloc] init]; + BOOL isSettingOn = [object isSettingOn:@"iconlabels"]; + + if(isSettingOn) { + arg1 = 0; + } + else { + arg1 = 1; + } + + %orig(arg1); +} +%end diff --git a/hanahakiprefs/Resources/Root.plist b/hanahakiprefs/Resources/Root.plist index 24c1073..d4d193f 100644 --- a/hanahakiprefs/Resources/Root.plist +++ b/hanahakiprefs/Resources/Root.plist @@ -54,6 +54,18 @@ label remove dock background + + cell + PSSwitchCell + default + + defaults + toys.lily.hanahakiprefs + key + iconlabels + label + remove app labels + title hanahaki