From: Jay Freeman (saurik) Date: Fri, 11 Mar 2011 15:30:43 +0000 (-0800) Subject: The orientation of the status bar is a global concept. X-Git-Tag: v1.1.0%b6~6 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/0b7516cf904517e79106f20d3bc72f26ce42fc1c?ds=inline The orientation of the status bar is a global concept. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index f842c175..dfbc5370 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -273,9 +273,9 @@ static _finline void UpdateExternalStatus(uint64_t newStatus) { notify_post("com.saurik.Cydia.status"); } -static CGFloat CYStatusBarHeight(UIInterfaceOrientation orientation) { +static CGFloat CYStatusBarHeight() { CGSize size([[UIApplication sharedApplication] statusBarFrame].size); - return UIInterfaceOrientationIsPortrait(orientation) ? size.height : size.width; + return UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]) ? size.height : size.width; } /* NSForcedOrderingSearch doesn't work on the iPhone */ @@ -6087,7 +6087,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CGRect intersection = CGRectIntersection(viewframe, kbframe); if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_3_0) // XXX: _UIApplicationLinkedOnOrAfter(4) - intersection.size.height += CYStatusBarHeight([self interfaceOrientation]); + intersection.size.height += CYStatusBarHeight(); [self resizeForKeyboardBounds:intersection duration:duration curve:curve]; } @@ -6912,7 +6912,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CGRect barframe([refreshbar_ frame]); if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_0) // XXX: _UIApplicationLinkedOnOrAfter(4) - barframe.origin.y = CYStatusBarHeight([self interfaceOrientation]); + barframe.origin.y = CYStatusBarHeight(); else barframe.origin.y = 0;