mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-13 02:08:55 +00:00
Various nib2cib improvements on the tableview.
This commit is contained in:
1 parent
d7a7d8e2ae
commit
9bdc5fa0fe
3 files changed
+18
-6
No files matched your search
@@ -3194,6 +3194,7 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
CPTableViewGridColorKey = @"CPTableViewGridColorKey",
|
||||
CPTableViewGridStyleMaskKey = @"CPTableViewGridStyleMaskKey",
|
||||
CPTableViewUsesAlternatingBackgroundKey = @"CPTableViewUsesAlternatingBackgroundKey",
|
||||
CPTableViewAlternatingRowColorsKey = @"CPTableViewAlternatingRowColorsKey",
|
||||
CPTableViewHeaderViewKey = @"CPTableViewHeaderViewKey",
|
||||
CPTableViewCornerViewKey = @"CPTableViewCornerViewKey";
|
||||
|
||||
@@ -3243,6 +3244,9 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
|
||||
_gridColor = [aCoder decodeObjectForKey:CPTableViewGridColorKey] || [CPColor grayColor];
|
||||
_gridStyleMask = [aCoder decodeIntForKey:CPTableViewGridStyleMaskKey] || CPTableViewGridNone;
|
||||
|
||||
_alternatingRowBackgroundColors = [aCoder decodeObjectForKey:CPTableViewAlternatingRowColorsKey];
|
||||
_usesAlternatingRowBackgroundColors = [aCoder decodeObjectForKey:CPTableViewUsesAlternatingBackgroundKey]
|
||||
|
||||
_headerView = [aCoder decodeObjectForKey:CPTableViewHeaderViewKey];
|
||||
_cornerView = [aCoder decodeObjectForKey:CPTableViewCornerViewKey];
|
||||
@@ -3286,6 +3290,7 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
[aCoder encodeInt:_gridStyleMask forKey:CPTableViewGridStyleMaskKey];
|
||||
|
||||
[aCoder encodeBool:_usesAlternatingRowBackgroundColors forKey:CPTableViewUsesAlternatingBackgroundKey];
|
||||
[aCoder encodeObject:_alternatingRowBackgroundColors forKey:CPTableViewAlternatingRowColorsKey]
|
||||
|
||||
[aCoder encodeObject:_cornerView forKey:CPTableViewCornerViewKey];
|
||||
[aCoder encodeObject:_headerView forKey:CPTableViewHeaderViewKey];
|
||||
|
||||
@@ -27,7 +27,13 @@
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (self = [super NS_initWithCoder:aCoder])
|
||||
{
|
||||
_tableView = [aCoder decodeObjectForKey:"NSTableView"];
|
||||
|
||||
// change the default height
|
||||
if (_bounds.size.height === 17)
|
||||
_bounds.size.height = 23;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -35,12 +35,6 @@
|
||||
|
||||
//_dataSource = [aCoder decodeObjectForKey:CPTableViewDataSourceKey];
|
||||
//_delegate = [aCoder decodeObjectForKey:CPTableViewDelegateKey];
|
||||
|
||||
_headerView = [aCoder decodeObjectForKey:@"NSHeaderView"];
|
||||
_cornerView = [aCoder decodeObjectForKey:@"NSCornerView"];
|
||||
|
||||
_tableColumns = [aCoder decodeObjectForKey:@"NSTableColumns"];
|
||||
[_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self];
|
||||
|
||||
_rowHeight = [aCoder decodeFloatForKey:@"NSRowHeight"];
|
||||
|
||||
@@ -48,12 +42,19 @@
|
||||
if (_rowHeight == 17)
|
||||
_rowHeight = 23;
|
||||
|
||||
_headerView = [aCoder decodeObjectForKey:@"NSHeaderView"];
|
||||
_cornerView = [aCoder decodeObjectForKey:@"NSCornerView"];
|
||||
|
||||
_tableColumns = [aCoder decodeObjectForKey:@"NSTableColumns"];
|
||||
[_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self];
|
||||
|
||||
_intercellSpacing = CGSizeMake(0.0, 0.0);//CGSizeMake([aCoder decodeFloatForKey:"NSIntercellSpacingWidth"], [aCoder decodeFloatForKey:"NSIntercellSpacingHeight"]);
|
||||
|
||||
_gridColor = [aCoder decodeObjectForKey:@"NSGridColor"];
|
||||
_gridStyleMask = [aCoder decodeIntForKey:@"NSGridStyleMask"];
|
||||
|
||||
_usesAlternatingRowBackgroundColors = (flags & 0x00800000) ? YES : NO;
|
||||
_alternatingRowBackgroundColors =[[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]];
|
||||
|
||||
_allowsMultipleSelection = (flags & 0x08000000) ? YES : NO;
|
||||
_allowsEmptySelection = (flags & 0x10000000) ? YES : NO;
|
||||
|
||||
Reference in new issue
Block a user