mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-09 16:38:45 +00:00
Fixed bug about font in tableViewHeader closed #1747
This commit is contained in:
1 parent
7c033f75ea
commit
bc2b26132a
1 file changed
+12
-1
@@ -30,6 +30,10 @@
|
||||
@import "NSLevelIndicator.j"
|
||||
@import "NSTextField.j"
|
||||
|
||||
@class Converter
|
||||
|
||||
var IBDefaultFontSizeTableHeader = 11.0;
|
||||
|
||||
@implementation CPTableColumn (NSCoding)
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
@@ -92,12 +96,19 @@
|
||||
[_dataView setValue:[dataViewCell alignment] forThemeAttribute:@"alignment"];
|
||||
|
||||
var headerCell = [aCoder decodeObjectForKey:@"NSHeaderCell"],
|
||||
headerView = [[_CPTableColumnHeaderView alloc] initWithFrame:CGRectMakeZero()];
|
||||
headerView = [[_CPTableColumnHeaderView alloc] initWithFrame:CGRectMakeZero()],
|
||||
theme = [[Converter sharedConverter] themes][0];
|
||||
|
||||
[headerView setStringValue:[headerCell objectValue]];
|
||||
[headerView setFont:[headerCell font]];
|
||||
[headerView setAlignment:[headerCell alignment]];
|
||||
|
||||
if ([[headerCell font] familyName] === IBDefaultFontFace && [[headerCell font] size] == IBDefaultFontSizeTableHeader)
|
||||
{
|
||||
[headerView setTextColor:[theme valueForAttributeWithName:@"text-color" forClass:_CPTableColumnHeaderView]];
|
||||
[headerView setFont:[theme valueForAttributeWithName:@"font" forClass:_CPTableColumnHeaderView]];
|
||||
}
|
||||
|
||||
[self setHeaderView:headerView];
|
||||
|
||||
_width = [aCoder decodeFloatForKey:@"NSWidth"];
|
||||
|
||||
Reference in new issue
Block a user