diff --git a/AppKit/CPTabView.j b/AppKit/CPTabView.j index 383112a6d..8e7a1f3e4 100644 --- a/AppKit/CPTabView.j +++ b/AppKit/CPTabView.j @@ -74,7 +74,7 @@ var HEIGHT_OF_SEGMENTED_CONTROL = 24; [self addSubview:box]; [self addSubview:tabs]; - [box setAutoresizingMask:CPViewWidthSizable]; + [box setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; [tabs setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin]; } return self; diff --git a/Tests/AppKit/CPTabViewTest.j b/Tests/AppKit/CPTabViewTest.j index 9bba62b40..7aa96e510 100644 --- a/Tests/AppKit/CPTabViewTest.j +++ b/Tests/AppKit/CPTabViewTest.j @@ -10,6 +10,11 @@ return tabs; } +- (CPBox)box +{ + return box; +} + @end @@ -62,4 +67,14 @@ [self assert:([tabs boundsSize].width / 2) equals:CPRectGetMidX([tabs bounds])]; } +- (void)testBoxHeight +{ + var box = [_tabView box], + tabs = [_tabView tabs]; + + [_tabView setFrame:CPRectMake(0, 0, 800, 800)]; + [self assert:[box frameSize].height equals:800 - ([box frameOrigin].y) - [tabs frameSize].height / 2]; +} + + @end \ No newline at end of file