mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 20:20:44 +00:00
Merge remote branch 'aparajita/NSCell-layout'
This commit is contained in:
commit
e23c70b5c4
1 file changed
+10
-6
+10
-6
@@ -39,7 +39,9 @@
|
||||
BOOL _isSelectable @accessors(readonly, getter=isSelectable);
|
||||
BOOL _isScrollable @accessors(readonly, getter=isScrollable);
|
||||
BOOL _isContinuous @accessors(readonly, getter=isContinuous);
|
||||
BOOL _scrolls @accessors(readonly, getter=scrolls);
|
||||
BOOL _wraps @accessors(readonly, getter=wraps);
|
||||
BOOL _truncates @accessors(readonly, getter=truncates);
|
||||
CPTextAlignment _alignment @accessors(readonly, getter=alignment);
|
||||
CPControlSize _controlSize @accessors(readonly, getter=controlSize);
|
||||
id _objectValue @accessors(readonly, getter=objectValue);
|
||||
@@ -50,7 +52,7 @@
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
|
||||
if (self)
|
||||
{
|
||||
var flags = [aCoder decodeIntForKey:@"NSCellFlags"],
|
||||
@@ -65,7 +67,9 @@
|
||||
_isSelectable = (flags & 0x00200000) ? YES : NO;
|
||||
_isScrollable = (flags & 0x00100000) ? YES : NO;
|
||||
_isContinuous = (flags & 0x00080100) ? YES : NO;
|
||||
_wraps = (flags & 0x00100000) ? NO : YES;
|
||||
_scrolls = (flags & 0x00100000) && (flags & 0x00000040);
|
||||
_wraps = (flags & 0x00100000 === 0) && (flags & 0x00000040 === 0);
|
||||
_truncates = !(flags & 0x00100000) && (flags & 0x00000040);
|
||||
_alignment = (flags2 & 0x1c000000) >> 26;
|
||||
_lineBreakMode = (flags2 & 0x0E00) >> 9;
|
||||
_controlSize = (flags2 & 0xE0000) >> 17;
|
||||
@@ -73,7 +77,7 @@
|
||||
_objectValue = [aCoder decodeObjectForKey:@"NSContents"];
|
||||
_font = [aCoder decodeObjectForKey:@"NSSupport"];
|
||||
}
|
||||
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -86,10 +90,10 @@
|
||||
{
|
||||
if ([_objectValue isKindOfClass:[CPString class]])
|
||||
return _objectValue;
|
||||
|
||||
|
||||
if ([_objectValue respondsToSelector:@selector(attributedStringValue)])
|
||||
return [_objectValue attributedStringValue];
|
||||
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -100,4 +104,4 @@
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
Reference in new issue
Block a user