diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-08 10:42:36 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-08 10:46:56 -0800 |
commit | 57daa971cb88b48e747968e4279b195fc199c4c8 (patch) | |
tree | 59f4b05007e3b9dd1f7576f85bffd53b4b7cab4f /MobileCydia.mm | |
parent | 655c7deded2bd1ac36fd5a105386691ef754ded8 (diff) |
Move -[CYTabBarController statusBarHeight] to ::CYStatusBarHeight().
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index ebe3971..23a9402 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -266,6 +266,11 @@ static _finline void UpdateExternalStatus(uint64_t newStatus) { notify_post("com.saurik.Cydia.status"); } +static CGFloat CYStatusBarHeight(UIInterfaceOrientation orientation) { + CGSize size([[UIApplication sharedApplication] statusBarFrame].size); + return UIInterfaceOrientationIsPortrait(orientation) ? size.height : size.width; +} + /* NSForcedOrderingSearch doesn't work on the iPhone */ static const NSStringCompareOptions MatchCompareOptions_ = NSLiteralSearch | NSCaseInsensitiveSearch; static const NSStringCompareOptions LaxCompareOptions_ = NSNumericSearch | NSDiacriticInsensitiveSearch | NSWidthInsensitiveSearch | NSCaseInsensitiveSearch; @@ -6533,14 +6538,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { updatedelegate_ = delegate; } -- (CGFloat) statusBarHeight { - if (UIInterfaceOrientationIsPortrait([self interfaceOrientation])) { - return [[UIApplication sharedApplication] statusBarFrame].size.height; - } else { - return [[UIApplication sharedApplication] statusBarFrame].size.width; - } -} - - (UIView *) transitionView { if ([self respondsToSelector:@selector(_transitionView)]) return [self _transitionView]; @@ -6559,7 +6556,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CGRect barframe([refreshbar_ frame]); if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_0) // XXX: _UIApplicationLinkedOnOrAfter(4) - barframe.origin.y = [self statusBarHeight]; + barframe.origin.y = CYStatusBarHeight([self interfaceOrientation]); else barframe.origin.y = 0; |