mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 16:12:58 +00:00
start of CPSplitView theming
This commit is contained in:
1 parent
e704d42adb
commit
b6da0fdf06
2 files changed
+20
-1
No files matched your search
+12
-1
@@ -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
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in new issue
Block a user