start of CPSplitView theming

This commit is contained in:
Klaas Pieter Annema committed 2010-09-07 10:23:21 +02:00
1 parent e704d42adb
commit b6da0fdf06
2 files changed
+20 -1

No files matched your search

+12 -1
View File
@@ -61,6 +61,17 @@ var CPSplitViewHorizontalImage = nil,
CPArray _buttonBars;
}
+ (CPString)themeClass
{
return @"splitview";
}
+ (id)themeAttributes
{
return [CPDictionary dictionaryWithObjects:[10.0, 1.0]
forKeys:[@"divider-thickness", @"pane-divider-thickness"]];
}
/*
@ignore
*/
@@ -91,7 +102,7 @@ var CPSplitViewHorizontalImage = nil,
- (float)dividerThickness
{
return _isPaneSplitter ? 1.0 : 10.0;
return [self currentValueForThemeAttribute:[self isPaneSplitter] ? @"pane-divider-thickness" : @"divider-thickness"];
}
- (BOOL)isVertical
+8
View File
@@ -1333,6 +1333,14 @@ var themedButtonValues = nil,
return view;
}
+ (CPSplitView)themedSplitView
{
var splitView = [[CPSplitView alloc] initWithFrame:CGRectMake(0.0, 0.0, 200.0, 200.0)];
[splitView setValue:10.0 forThemeAttribute:@"divider-thickness"];
[splitView setValue:1.0 forThemeAttribute:@"pane-divider-thickness"];
return splitView;
}
+ (CPAlert)themedAlert
{
var alert = [CPAlert new],