mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-08 11:47:14 +00:00
Merge branch 'fix-cptabview-height-resizing' of https://github.com/primalmotion/cappuccino into primalmotion-fix-cptabview-height-resizing
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user