mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 04:00:42 +00:00
Styled the test for the tableview headers, also added more rows to tabletest for performance testing.
This commit is contained in:
1 parent
6b58986ec3
commit
2b87b9f3fc
2 files changed
+14
-5
No files matched your search
@@ -38,6 +38,14 @@ var CPThemeStatePressed = CPThemeState("pressed");
|
||||
{
|
||||
_textField = [[CPTextField alloc] initWithFrame:[self bounds]];
|
||||
[_textField setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable];
|
||||
[_textField setTextColor: [CPColor colorWithHexString: @"333333"]];
|
||||
[_textField setValue:[CPFont boldSystemFontOfSize:12.0] forThemeAttribute:@"font"];
|
||||
[_textField setValue:CPLeftTextAlignment forThemeAttribute:@"alignment"];
|
||||
[_textField setVerticalAlignment:CPCenterVerticalTextAlignment];
|
||||
[_textField setValue:CGSizeMake(0,1) forThemeAttribute:@"text-shadow-offset"];
|
||||
[_textField setValue:[CPColor whiteColor] forThemeAttribute:@"text-shadow-color"];
|
||||
|
||||
|
||||
[self addSubview:_textField];
|
||||
}
|
||||
|
||||
@@ -77,6 +85,11 @@ var CPThemeStatePressed = CPThemeState("pressed");
|
||||
{
|
||||
[_textField sizeToFit];
|
||||
}
|
||||
|
||||
- (void)setValue:(id)aValue forThemeAttribute:(id)aKey
|
||||
{
|
||||
[_textField setValue:aValue forThemeAttribute:aKey];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation CPTableHeaderView : CPView
|
||||
|
||||
@@ -22,7 +22,7 @@ CPLogRegister(CPLogConsole);
|
||||
dataSet1 = [],
|
||||
dataSet2 = [];
|
||||
|
||||
for(var i = 1; i < 100; i++)
|
||||
for(var i = 1; i < 500000; i++)
|
||||
{
|
||||
dataSet1[i - 1] = i;
|
||||
dataSet2[i - 1] = i + 10;
|
||||
@@ -75,8 +75,6 @@ CPLogRegister(CPLogConsole);
|
||||
var column = [[CPTableColumn alloc] initWithIdentifier:String(i)];
|
||||
|
||||
[[column headerView] setStringValue:"Number "+i];
|
||||
[[column headerView] sizeToFit];
|
||||
//[column setWidth:[[column headerView] frame].size.width + 20];
|
||||
|
||||
[column setWidth:200.0];
|
||||
[column setMinWidth:150.0];
|
||||
@@ -160,8 +158,6 @@ CPLogRegister(CPLogConsole);
|
||||
var column = [[CPTableColumn alloc] initWithIdentifier:String(i)];
|
||||
|
||||
[[column headerView] setStringValue:"Number "+i];
|
||||
[[column headerView] sizeToFit];
|
||||
//[column setWidth:[[column headerView] frame].size.width + 20];
|
||||
|
||||
[column setWidth:200.0];
|
||||
[column setMinWidth:150.0];
|
||||
|
||||
Reference in new issue
Block a user