]> git.saurik.com Git - winterboard.git/commitdiff
Fix the separation of Docked/Undocked icon labels.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 10 Jan 2014 11:54:29 +0000 (03:54 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 10 Jan 2014 11:54:29 +0000 (03:54 -0800)
Library.mm

index b3eb56c42ea30c2e0d1092bc90daa4dce8ff45cd..42fd396a1ba020c2b4ec5ffccb4c8e621c5345d3 100644 (file)
@@ -1784,6 +1784,15 @@ MSClassMessage2(id, SBIconView, _labelImageParametersForIcon,location, id, icon,
     } return nil;
 }
 
+MSInstanceMessage0(id, SBIconView, _labelImageParameters) {
+    if (id parameters = MSOldCall()) {
+        int &location(MSHookIvar<int>(self, "_iconLocation"));
+        if (&location != NULL)
+            $objc_setAssociatedObject(parameters, @selector(wb$inDock), [NSNumber numberWithBool:(location == 3)], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+        return parameters;
+    } return nil;
+}
+
 MSClassMessage1(UIImage *, SBIconLabelImage, _drawLabelImageForParameters, id, parameters) {
     bool docked(wb$inDock(parameters));
 
@@ -2140,6 +2149,7 @@ static void SBInitialize() {
     } else {
         WBRename(SBIconLabelImageParameters, hash, hash);
         WBRename($SBIconView, _labelImageParametersForIcon:location:, _labelImageParametersForIcon$location$);
+        WBRename(SBIconView, _labelImageParameters, _labelImageParameters);
         WBRename($SBIconLabelImage, _drawLabelImageForParameters:, _drawLabelImageForParameters$);
     }