Browse Source

can now remove icon labels

master
lillian rose winter 6 months ago
parent
commit
2b00a4f6a2
3 changed files with 69 additions and 0 deletions
  1. +7
    -0
      Headers.h
  2. +50
    -0
      Tweak.x
  3. +12
    -0
      hanahakiprefs/Resources/Root.plist

+ 7
- 0
Headers.h View File

@@ -2,6 +2,7 @@
#import <os/log.h>
#import <substrate.h>

// 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

+ 50
- 0
Tweak.x View File

@@ -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

+ 12
- 0
hanahakiprefs/Resources/Root.plist View File

@@ -54,6 +54,18 @@
<key>label</key>
<string>remove dock background</string>
</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>
<key>title</key>
<string>hanahaki</string>


Loading…
Cancel
Save