From: Jay Freeman (saurik) Date: Fri, 10 Jan 2014 11:54:29 +0000 (-0800) Subject: Fix the separation of Docked/Undocked icon labels. X-Git-Tag: v0.9.3912~17 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/a3dba89ffcf041716dd891eb1f2a5b06e7584c98 Fix the separation of Docked/Undocked icon labels. --- diff --git a/Library.mm b/Library.mm index b3eb56c..42fd396 100644 --- a/Library.mm +++ b/Library.mm @@ -1784,6 +1784,15 @@ MSClassMessage2(id, SBIconView, _labelImageParametersForIcon,location, id, icon, } return nil; } +MSInstanceMessage0(id, SBIconView, _labelImageParameters) { + if (id parameters = MSOldCall()) { + int &location(MSHookIvar(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$); }