can now remove icon labels

This commit is contained in:
lillian rose winter 2019-11-25 13:33:56 -06:00
parent 378f7dcd0d
commit 2b00a4f6a2
3 changed files with 69 additions and 0 deletions

View file

@ -2,6 +2,7 @@
#import <os/log.h> #import <os/log.h>
#import <substrate.h> #import <substrate.h>
// dock bg
@interface _UIBackdropView : UIView {} @interface _UIBackdropView : UIView {}
@end @end
@ -9,8 +10,14 @@
@property (nonatomic, retain) _UIBackdropView * backgroundView; @property (nonatomic, retain) _UIBackdropView * backgroundView;
@end @end
// corner radius
@interface _UIRootWindow : UIView @interface _UIRootWindow : UIView
@property (setter=_setContinuousCornerRadius:, nonatomic) double _continuousCornerRadius; @property (setter=_setContinuousCornerRadius:, nonatomic) double _continuousCornerRadius;
- (double)_continuousCornerRadius; - (double)_continuousCornerRadius;
- (void)_setContinuousCornerRadius:(double)arg1; - (void)_setContinuousCornerRadius:(double)arg1;
@end @end
// icon labels
@interface SBIconView : UIView
@property (assign,nonatomic) double iconLabelAlpha;
@end

50
Tweak.x
View file

@ -82,3 +82,53 @@
return; return;
} }
%end %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

View file

@ -54,6 +54,18 @@
<key>label</key> <key>label</key>
<string>remove dock background</string> <string>remove dock background</string>
</dict> </dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>toys.lily.hanahakiprefs</string>
<key>key</key>
<string>iconlabels</string>
<key>label</key>
<string>remove app labels</string>
</dict>
</array> </array>
<key>title</key> <key>title</key>
<string>hanahaki</string> <string>hanahaki</string>