replace hide 3d touch divs with hide quick actions background
This commit is contained in:
32
Tweak.x
32
Tweak.x
@ -18,20 +18,20 @@ static NSString *nsDomainString = @"com.yaypixxo.kage";
|
|||||||
static NSString *nsNotificationString = @"com.yaypixxo.kage/preferences.changed";
|
static NSString *nsNotificationString = @"com.yaypixxo.kage/preferences.changed";
|
||||||
|
|
||||||
static BOOL enabled;
|
static BOOL enabled;
|
||||||
static BOOL hide3dDivs;
|
static BOOL hideQuickActionsBG;
|
||||||
static BOOL gridSwitcher;
|
static BOOL gridSwitcher;
|
||||||
static BOOL hideLSBatt;
|
static BOOL hideLSBatt;
|
||||||
static BOOL statusBarShowTimeLS;
|
static BOOL statusBarShowTimeLS;
|
||||||
|
|
||||||
static void notificationCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
|
static void notificationCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
|
||||||
NSNumber *eEnabled = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"enabled" inDomain:nsDomainString];
|
NSNumber *eEnabled = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"enabled" inDomain:nsDomainString];
|
||||||
NSNumber *eHide3dDivs = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hide3dDivs" inDomain:nsDomainString];
|
NSNumber *eHideQuickActionsBG = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideQuickActionsBG" inDomain:nsDomainString];
|
||||||
NSNumber *eGridSwitcher = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"gridSwitcher" inDomain:nsDomainString];
|
NSNumber *eGridSwitcher = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"gridSwitcher" inDomain:nsDomainString];
|
||||||
NSNumber *eHideLSBatt = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLSBatt" inDomain:nsDomainString];
|
NSNumber *eHideLSBatt = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLSBatt" inDomain:nsDomainString];
|
||||||
NSNumber *eStatusBarShowTimeLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarShowTimeLS" inDomain:nsDomainString];
|
NSNumber *eStatusBarShowTimeLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarShowTimeLS" inDomain:nsDomainString];
|
||||||
|
|
||||||
enabled = (eEnabled) ? [eEnabled boolValue]:NO;
|
enabled = (eEnabled) ? [eEnabled boolValue]:NO;
|
||||||
hide3dDivs = (eHide3dDivs) ? [eHide3dDivs boolValue]:NO;
|
hideQuickActionsBG = (eHideQuickActionsBG) ? [eHideQuickActionsBG boolValue]:NO;
|
||||||
gridSwitcher = (eGridSwitcher) ? [eGridSwitcher boolValue]:NO;
|
gridSwitcher = (eGridSwitcher) ? [eGridSwitcher boolValue]:NO;
|
||||||
hideLSBatt = (eHideLSBatt) ? [eHideLSBatt boolValue]:NO;
|
hideLSBatt = (eHideLSBatt) ? [eHideLSBatt boolValue]:NO;
|
||||||
statusBarShowTimeLS = (eStatusBarShowTimeLS) ? [eStatusBarShowTimeLS boolValue]:NO;
|
statusBarShowTimeLS = (eStatusBarShowTimeLS) ? [eStatusBarShowTimeLS boolValue]:NO;
|
||||||
@ -40,29 +40,17 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
|
|||||||
// hooks and stuff
|
// hooks and stuff
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
// 3D TOUCH DIVS START //
|
// QUICK ACTIONS BG START //
|
||||||
%hook SBUIActionKeylineView
|
%hook UICoverSheetButton
|
||||||
- (void)didMoveToSuperview {
|
-(id)_backgroundEffectsWithBrightness:(double)arg1 {
|
||||||
if (enabled && hide3dDivs) {
|
if (enabled && hideQuickActionsBG) {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
%orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%end
|
// QUICK ACTIONS BG END //
|
||||||
|
|
||||||
%hook _UIInterfaceActionBlankSeparatorView
|
|
||||||
- (void)setConstantAxisDimension:(double)arg1 {
|
|
||||||
if (enabled && hide3dDivs) {
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
%orig;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%end
|
|
||||||
// 3D TOUCH DIVS END //
|
|
||||||
|
|
||||||
// GRID SWITCHER START //
|
// GRID SWITCHER START //
|
||||||
%hook SBAppSwitcherSettings
|
%hook SBAppSwitcherSettings
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
<key>defaults</key>
|
<key>defaults</key>
|
||||||
<string>com.yaypixxo.kage</string>
|
<string>com.yaypixxo.kage</string>
|
||||||
<key>key</key>
|
<key>key</key>
|
||||||
<string>hide3dDivs</string>
|
<string>hideQuickActionsBG</string>
|
||||||
<key>label</key>
|
<key>label</key>
|
||||||
<string>Hide 3D Touch Dividers (broken)</string>
|
<string>Hide Quick Actions BG</string>
|
||||||
<key>PostNotification</key>
|
<key>PostNotification</key>
|
||||||
<string>com.yaypixxo.kage/preferences.changed</string>
|
<string>com.yaypixxo.kage/preferences.changed</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
Reference in New Issue
Block a user