Skip to content

Commit

Permalink
Merge pull request #41 from balthisar/revert_to_instrinsic
Browse files Browse the repository at this point in the history
NSViewNoIntrinsicMetric fix for pre 10.11.
  • Loading branch information
MiMo42 authored Jun 21, 2016
2 parents 38ff7cd + d89f837 commit afea971
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MMTabBarView Demo/MMTabBarView Demo/DemoWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ -(void)_updateForOrientation:(MMTabBarOrientation)newOrientation {
NSSize intrinsicTabBarContentSize = [tabBar intrinsicContentSize];

if (newOrientation == MMTabBarHorizontalOrientation) {
if (intrinsicTabBarContentSize.height == NSViewNoIntrinsicMetric)
if (intrinsicTabBarContentSize.height == NSViewNoInstrinsicMetric)
intrinsicTabBarContentSize.height = 22;
tabBarFrame.size.height = [tabBar isTabBarHidden] ? 1 : intrinsicTabBarContentSize.height;
tabBarFrame.size.width = totalFrame.size.width;
Expand Down
2 changes: 1 addition & 1 deletion MMTabBarView/MMTabBarView/MMTabBarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ - (NSSize)intrinsicContentSize
if ([_style respondsToSelector:@selector(intrinsicContentSizeOfTabBarView:)])
return [_style intrinsicContentSizeOfTabBarView:self];

return NSMakeSize(NSViewNoIntrinsicMetric, NSViewNoIntrinsicMetric);
return NSMakeSize(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
}

#pragma mark -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (id) init {

- (NSSize)intrinsicContentSizeOfTabBarView:(MMTabBarView *)tabBarView
{
return NSMakeSize(NSViewNoIntrinsicMetric, 25);
return NSMakeSize(NSViewNoInstrinsicMetric, 25);
}

- (CGFloat)leftMarginForTabBarView:(MMTabBarView *)tabBarView {
Expand Down

0 comments on commit afea971

Please sign in to comment.