mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fixed: Before this PR, CPBox followed the autoresizesSubviews flags while Cocoa NSBox always autoresizes its subviews, whatever the flag is set to. (#2992)
This commit is contained in:
@@ -67,6 +67,8 @@ CPBelowBottom = 6;
|
||||
CPString _title @accessors(getter=title);
|
||||
int _titlePosition @accessors(getter=titlePosition);
|
||||
CPTextField _titleView;
|
||||
|
||||
BOOL _cachedAutoresizesSubviews;
|
||||
}
|
||||
|
||||
+ (Class)_binderClassForBinding:(CPString)aBinding
|
||||
@@ -812,6 +814,19 @@ CPBelowBottom = 6;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (void)setAutoresizesSubviews:(BOOL)flag
|
||||
{
|
||||
// CPBox should always resize its subviews, like in Cocoa, whatever is the corresponding flag set.
|
||||
// We have to keep the flag value as we could have to return it in -autoresizesSubview method.
|
||||
_cachedAutoresizesSubviews = !!flag;
|
||||
[super setAutoresizesSubviews:YES];
|
||||
}
|
||||
|
||||
- (BOOL)autoresizesSubview
|
||||
{
|
||||
return _cachedAutoresizesSubviews;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user