#import <CoreGraphics/CGGeometry.h>
#import <SpringBoard/SBButtonBar.h>
#import <SpringBoard/SBIcon.h>
+#import <SpringBoard/SBIconModel.h>
MSHook(float, SBButtonBar$leftMarginForIconRowArray$, SBButtonBar *self, SEL sel, NSArray *row) {
return [row indexOfObject:[NSNull null]] == NSNotFound ? 4 : _SBButtonBar$leftMarginForIconRowArray$(self, sel, row);
return origin;
}
+static int $SBIconModel$maxIconListCount(SBIconModel *self, SEL sel) {
+ return 16;
+}
+
extern "C" void TweakInitialize() {
Class $SBButtonBar(objc_getClass("SBButtonBar"));
- _SBButtonBar$leftMarginForIconRowArray$ = MSHookMessage($SBButtonBar, @selector(leftMarginForIconRowArray:), &$SBButtonBar$leftMarginForIconRowArray$);
+ MSHookMessage($SBButtonBar, @selector(leftMarginForIconRowArray:), MSHake(SBButtonBar$leftMarginForIconRowArray$));
MSHookMessage($SBButtonBar, @selector(maxIconColumns), &$SBButtonBar$maxIconColumns);
MSHookMessage($SBButtonBar, @selector(topIconPadding), &$SBButtonBar$topIconPadding);
- _SBButtonBar$originForIconAtX$Y$ = MSHookMessage($SBButtonBar, @selector(originForIconAtX:Y:), &$SBButtonBar$originForIconAtX$Y$);
+ MSHookMessage($SBButtonBar, @selector(originForIconAtX:Y:), MSHake(SBButtonBar$originForIconAtX$Y$));
Class $SBIcon(objc_getClass("SBIcon"));
- _SBIcon$setOrigin$ = MSHookMessage($SBIcon, @selector(setOrigin:), &$SBIcon$setOrigin$);
+ MSHookMessage($SBIcon, @selector(setOrigin:), MSHake(SBIcon$setOrigin$));
+
+ Class $SBIconModel(objc_getClass("SBIconModel"));
+ Class $$SBIconModel(object_getClass($SBIconModel));
+ MSHookMessage($$SBIconModel, @selector(maxIconListCount), &$SBIconModel$maxIconListCount);
}