mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-06 17:12:50 +00:00
Fix for issue #816 (NSTableView/CPTableView do not read selection highlight style and column resizing style)
This commit is contained in:
1 parent
82ad1bb30e
commit
0adfd30ea3
2 files changed
+10
-1
No files matched your search
@@ -3497,11 +3497,13 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
CPTableViewTableColumnsKey = @"CPTableViewTableColumnsKey",
|
||||
CPTableViewRowHeightKey = @"CPTableViewRowHeightKey",
|
||||
CPTableViewIntercellSpacingKey = @"CPTableViewIntercellSpacingKey",
|
||||
CPTableViewSelectionHighlightStyleKey = @"CPTableViewSelectionHighlightStyleKey",
|
||||
CPTableViewMultipleSelectionKey = @"CPTableViewMultipleSelectionKey",
|
||||
CPTableViewEmptySelectionKey = @"CPTableViewEmptySelectionKey",
|
||||
CPTableViewColumnReorderingKey = @"CPTableViewColumnReorderingKey",
|
||||
CPTableViewColumnResizingKey = @"CPTableViewColumnResizingKey",
|
||||
CPTableViewColumnSelectionKey = @"CPTableViewColumnSelectionKey",
|
||||
CPTableViewColumnAutoresizingStyleKey = @"CPTableViewColumnAutoresizingStyleKey",
|
||||
CPTableViewGridColorKey = @"CPTableViewGridColorKey",
|
||||
CPTableViewGridStyleMaskKey = @"CPTableViewGridStyleMaskKey",
|
||||
CPTableViewUsesAlternatingBackgroundKey = @"CPTableViewUsesAlternatingBackgroundKey",
|
||||
@@ -3525,7 +3527,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
_allowsColumnSelection = [aCoder decodeBoolForKey:CPTableViewColumnSelectionKey];
|
||||
|
||||
//Setting Display Attributes
|
||||
_selectionHighlightStyle = CPTableViewSelectionHighlightStyleRegular;
|
||||
_selectionHighlightStyle = [aCoder decodeIntForKey:CPTableViewSelectionHighlightStyleKey];
|
||||
_columnAutoResizingStyle = [aCoder decodeIntForKey:CPTableViewColumnAutoresizingStyleKey];
|
||||
|
||||
_tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey] || [];
|
||||
[_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self];
|
||||
@@ -3567,6 +3570,9 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
[aCoder encodeFloat:_rowHeight forKey:CPTableViewRowHeightKey];
|
||||
[aCoder encodeSize:_intercellSpacing forKey:CPTableViewIntercellSpacingKey];
|
||||
|
||||
[aCoder encodeInt:_selectionHighlightStyle forKey:CPTableViewSelectionHighlightStyleKey];
|
||||
[aCoder encodeInt:_columnAutoResizingStyle forKey:CPTableViewColumnAutoresizingStyleKey];
|
||||
|
||||
[aCoder encodeBool:_allowsMultipleSelection forKey:CPTableViewMultipleSelectionKey];
|
||||
[aCoder encodeBool:_allowsEmptySelection forKey:CPTableViewEmptySelectionKey];
|
||||
[aCoder encodeBool:_allowsColumnReordering forKey:CPTableViewColumnReorderingKey];
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
_usesAlternatingRowBackgroundColors = (flags & 0x00800000) ? YES : NO;
|
||||
_alternatingRowBackgroundColors =[[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]];
|
||||
|
||||
_selectionHighlightStyle = [aCoder decodeIntForKey:@"NSTableViewSelectionHighlightStyle"] || CPTableViewSelectionHighlightStyleRegular;
|
||||
_columnAutoResizingStyle = [aCoder decodeIntForKey:@"NSColumnAutoresizingStyle"];
|
||||
|
||||
_allowsMultipleSelection = (flags & 0x08000000) ? YES : NO;
|
||||
_allowsEmptySelection = (flags & 0x10000000) ? YES : NO;
|
||||
_allowsColumnSelection = (flags & 0x04000000) ? YES : NO;
|
||||
|
||||
Reference in new issue
Block a user