mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-20 13:39:22 +00:00
remove 'drunk' code and simply use resizing masks
This commit is contained in:
1 parent
560c971aeb
commit
3d82203893
1 file changed
+3
-40
+3
-40
@@ -73,50 +73,13 @@ var HEIGHT_OF_SEGMENTED_CONTROL = 24;
|
||||
|
||||
[self addSubview:box];
|
||||
[self addSubview:tabs];
|
||||
|
||||
[box setAutoresizingMask:CPViewWidthSizable];
|
||||
[tabs setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
/*!
|
||||
Override CPView message to allow to set the autoresizing mask
|
||||
of the tabview and it's subview
|
||||
|
||||
@param unsigned aMask the autoresizing mask
|
||||
*/
|
||||
- (void)setAutoresizingMask:(unsigned)aMask
|
||||
{
|
||||
[box setAutoresizingMask:aMask];
|
||||
|
||||
[super setAutoresizingMask:aMask];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Override the CPView method in order
|
||||
to allow to reposition the segmented control
|
||||
|
||||
@param aFrame the new frame
|
||||
*/
|
||||
- (void)setFrame:(CGRect)aFrame
|
||||
{
|
||||
[super setFrame:aFrame];
|
||||
|
||||
[self _repositionTabs];
|
||||
}
|
||||
|
||||
/*!
|
||||
Override the CPView method in order
|
||||
to allow to reposition the segmented control
|
||||
|
||||
@param someBounds the new bounds
|
||||
*/
|
||||
- (void)setBounds:(CGRect)someBounds
|
||||
{
|
||||
[super setBounds:someBounds];
|
||||
|
||||
[self _repositionTabs];
|
||||
}
|
||||
|
||||
// Adding and Removing Tabs
|
||||
/*!
|
||||
Adds a CPTabViewItem to the tab view.
|
||||
|
||||
Reference in new issue
Block a user