]> git.saurik.com Git - cydia.git/commitdiff
Actually fixed the dropbar adjustments on iOS 7.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 24 Dec 2013 02:20:02 +0000 (18:20 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 24 Dec 2013 02:20:02 +0000 (18:20 -0800)
MobileCydia.mm

index a78e6b026fd4c591c706861d32ae71f1ce949e78..27d397f42fba1ea9c9ae9b5ee29fd11638f78aa9 100644 (file)
@@ -7104,7 +7104,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     else if (kCFCoreFoundationVersionNumber < 800)
         return [self _transitionView];
     else
-        return [[self _transitionView] superview];
+        return [[[self _transitionView] superview] superview];
 }
 
 - (void) dropBar:(BOOL)animated {
@@ -7122,7 +7122,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     else if (kCFCoreFoundationVersionNumber < 800)
         barframe.origin.y = CYStatusBarHeight();
     else
-        barframe.origin.y = -barframe.size.height;
+        barframe.origin.y = -barframe.size.height + CYStatusBarHeight();
 
     [refreshbar_ setFrame:barframe];
 
@@ -7130,8 +7130,11 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
         [UIView beginAnimations:nil context:NULL];
 
     CGRect viewframe = [transition frame];
-    viewframe.origin.y += barframe.size.height;
-    viewframe.size.height -= barframe.size.height;
+    float adjust(barframe.size.height);
+    if (kCFCoreFoundationVersionNumber >= 800)
+        adjust -= CYStatusBarHeight();
+    viewframe.origin.y += adjust;
+    viewframe.size.height -= adjust;
     [transition setFrame:viewframe];
 
     if (animated)
@@ -7156,8 +7159,11 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
         [UIView beginAnimations:nil context:NULL];
 
     CGRect viewframe = [transition frame];
-    viewframe.origin.y -= barframe.size.height;
-    viewframe.size.height += barframe.size.height;
+    float adjust(barframe.size.height);
+    if (kCFCoreFoundationVersionNumber >= 800)
+        adjust -= CYStatusBarHeight();
+    viewframe.origin.y -= adjust;
+    viewframe.size.height += adjust;
     [transition setFrame:viewframe];
 
     if (animated)