Fix duplicate _size and use the _frame in the attributes class

This commit is contained in:
Gregory John Casamento 2022-11-27 08:26:21 -05:00
parent 95fa4e0368
commit fe2a988111
2 changed files with 4 additions and 5 deletions

View file

@ -62,7 +62,6 @@ APPKIT_EXPORT_CLASS
@interface NSCollectionViewLayoutAttributes : NSObject <NSCopying>
{
NSRect _frame;
NSSize _size;
CGFloat _alpha;
NSInteger _zIndex;
BOOL _hidden;

View file

@ -76,12 +76,12 @@
- (NSSize) size
{
return _size;
return _frame.size;
}
- (void) setSize: (NSSize)size
{
_size = size;
_frame.size = size;
}
- (CGFloat) alpha
@ -151,8 +151,8 @@
- (NSString *) description
{
return [NSString stringWithFormat: @"%@ - f = %@, s = %@, alpha = %f, z = %ld",
[super description], NSStringFromRect(_frame), NSStringFromSize(_size),
return [NSString stringWithFormat: @"%@ - f = %@, alpha = %f, z = %ld",
[super description], NSStringFromRect(_frame),
_alpha, _zIndex];
}