1
1
mirror of https://github.com/Burrit0z/Dockify_Source.git synced 2025-07-01 20:16:47 +00:00
This commit is contained in:
Burrit0z
2019-12-28 09:13:37 -05:00
parent d538437880
commit c0d7152d3e

28
Tweak.x
View File

@ -1,7 +1,8 @@
//Set up stuff //I looked at Kritanta's "Home Plus" tweak for help with ios13 stuff. I DID NOT
//#import <SpringBoardHome/SBDockIconListView.h> //copy anything, at least knowingly because these tweaks are simillar, please
//#import <SpringBoardHome/SBDockView.h> //understand the code may be simillar becuase we are doing similar things.
//#import <SpringBoardHome/SBIconListView.h> //I am liscensing this under MIT, anyone can use anything they need to from here
#include <UIKit/UIKit.h>
#import <Cephei/HBPreferences.h> #import <Cephei/HBPreferences.h>
@interface SBDockView @interface SBDockView
@ -14,6 +15,13 @@
@interface SBIconListView @interface SBIconListView
@end @end
@interface SBRootIconListView : UIView
+ (NSInteger)iconColumnsForInterfaceOrientation;
@end
@interface SBDockIconListView : SBRootIconListView
@end
//Set up variables for use with Cephei //Set up variables for use with Cephei
static BOOL transparent; static BOOL transparent;
static BOOL hidden; static BOOL hidden;
@ -27,6 +35,7 @@ HBPreferences *preferences;
%hook SBDockView %hook SBDockView
//this deals with everything adjusting opacity/transparency //this deals with everything adjusting opacity/transparency
//ios 12 and 13
-(void)setBackgroundAlpha:(double)arg1 { -(void)setBackgroundAlpha:(double)arg1 {
if (transparent == NO && hidden == NO) { //if not transparent and not hidden if (transparent == NO && hidden == NO) { //if not transparent and not hidden
%orig(customOpacity); %orig(customOpacity);
@ -51,6 +60,7 @@ HBPreferences *preferences;
%hook SBDockIconListView %hook SBDockIconListView
//ios 12
+(NSInteger)maxIcons { +(NSInteger)maxIcons {
if (hidden) { if (hidden) {
return (0); return (0);
@ -59,15 +69,7 @@ HBPreferences *preferences;
} }
} }
-(BOOL)allowsAddingIconCount:(unsigned long long)arg1 { //ios13
if (hidden) {
return (0);
%orig(NO);
} else {
%orig(YES);
return (setIconNumber);
}
}
%end %end