diff --git a/AppKit/CPCookie.j b/AppKit/CPCookie.j index 76ae57560..cbbf45e27 100644 --- a/AppKit/CPCookie.j +++ b/AppKit/CPCookie.j @@ -94,7 +94,7 @@ domain = ""; #if PLATFORM(DOM) - document.cookie = _cookieName+"="+value+expires+"; path=/"+domain; + document.cookie = _cookieName + "=" + value + expires + "; path=/" + domain; #else _cookieValue = value; _expires = expires; diff --git a/AppKit/CPLevelIndicator.j b/AppKit/CPLevelIndicator.j index 27d688800..8ae219b2e 100644 --- a/AppKit/CPLevelIndicator.j +++ b/AppKit/CPLevelIndicator.j @@ -32,14 +32,6 @@ CPContinuousCapacityLevelIndicatorStyle = 1; CPDiscreteCapacityLevelIndicatorStyle = 2; CPRatingLevelIndicatorStyle = 3; -var _CPLevelIndicatorBezelColor = nil, - _CPLevelIndicatorSegmentEmptyColor = nil, - _CPLevelIndicatorSegmentNormalColor = nil, - _CPLevelIndicatorSegmentWarningColor = nil, - _CPLevelIndicatorSegmentCriticalColor = nil, - - _CPLevelIndicatorSpacing = 1; - /*! @ingroup appkit @class CPLevelIndicator @@ -62,59 +54,23 @@ var _CPLevelIndicatorBezelColor = nil, BOOL _isTracking; } -+ (void)initialize ++ (CPString)defaultThemeClass { - if (self !== [CPLevelIndicator class]) - return; - - var bundle = [CPBundle bundleForClass:CPLevelIndicator]; - - _CPLevelIndicatorBezelColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-bezel-left.png"] size:CGSizeMake(3.0, 18.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-bezel-center.png"] size:CGSizeMake(1.0, 18.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-bezel-right.png"] size:CGSizeMake(3.0, 18.0)] - ] - isVertical:NO - ]]; - - _CPLevelIndicatorSegmentEmptyColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-empty-left.png"] size:CGSizeMake(3.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-empty-center.png"] size:CGSizeMake(1.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-empty-right.png"] size:CGSizeMake(3.0, 17.0)] - ] - isVertical:NO - ]]; - - _CPLevelIndicatorSegmentNormalColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-normal-left.png"] size:CGSizeMake(3.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-normal-center.png"] size:CGSizeMake(1.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-normal-right.png"] size:CGSizeMake(3.0, 17.0)] - ] - isVertical:NO - ]]; - - _CPLevelIndicatorSegmentWarningColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-warning-left.png"] size:CGSizeMake(3.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-warning-center.png"] size:CGSizeMake(1.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-warning-right.png"] size:CGSizeMake(3.0, 17.0)] - ] - isVertical:NO - ]]; - - _CPLevelIndicatorSegmentCriticalColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-critical-left.png"] size:CGSizeMake(3.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-critical-center.png"] size:CGSizeMake(1.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPLevelIndicator/level-indicator-segment-critical-right.png"] size:CGSizeMake(3.0, 17.0)] - ] - isVertical:NO - ]]; + return "level-indicator"; } ++ (id)themeAttributes +{ + return [CPDictionary dictionaryWithObjectsAndKeys: [CPNull null], @"bezel-color", + [CPNull null], @"color-empty", + [CPNull null], @"color-normal", + [CPNull null], @"color-warning", + [CPNull null], @"color-critical", + 1.0, @"spacing"]; +} + + + - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; @@ -142,20 +98,20 @@ var _CPLevelIndicatorBezelColor = nil, positioned:CPWindowBelow relativeToEphemeralSubviewNamed:nil]; // TODO Make themable. - [bezelView setBackgroundColor:_CPLevelIndicatorBezelColor]; + [bezelView setBackgroundColor:[self valueForThemeAttribute:@"bezel-color"]]; var segmentCount = _maxValue - _minValue; if (segmentCount <= 0) return; - var filledColor = _CPLevelIndicatorSegmentNormalColor, + var filledColor = [self valueForThemeAttribute:@"color-normal"], value = [self doubleValue]; if (value <= _criticalValue) - filledColor = _CPLevelIndicatorSegmentCriticalColor; + filledColor = [self valueForThemeAttribute:@"color-critical"]; else if (value <= _warningValue) - filledColor = _CPLevelIndicatorSegmentWarningColor; + filledColor = [self valueForThemeAttribute:@"color-warning"]; for (var i = 0; i < segmentCount; i++) { @@ -163,7 +119,7 @@ var _CPLevelIndicatorBezelColor = nil, positioned:CPWindowAbove relativeToEphemeralSubviewNamed:bezelView]; - [segmentView setBackgroundColor:(_minValue + i) < value ? filledColor : _CPLevelIndicatorSegmentEmptyColor]; + [segmentView setBackgroundColor:(_minValue + i) < value ? filledColor : [self valueForThemeAttribute:@"color-empty"]]; } } @@ -194,11 +150,12 @@ var _CPLevelIndicatorBezelColor = nil, return _CGRectMakeZero(); var basicSegmentWidth = bounds.size.width / segmentCount, - segmentFrame = CGRectCreateCopy([self bounds]); + segmentFrame = CGRectCreateCopy([self bounds]), + spacing = [self valueForThemeAttribute:@"spacing"]; segmentFrame.origin.y = (_CGRectGetHeight(bounds) - bezelHeight) / 2.0; segmentFrame.origin.x = FLOOR(segment * basicSegmentWidth); - segmentFrame.size.width = (segment == segmentCount - 1) ? bounds.size.width - segmentFrame.origin.x : FLOOR(((segment + 1) * basicSegmentWidth)) - FLOOR((segment * basicSegmentWidth)) - _CPLevelIndicatorSpacing; + segmentFrame.size.width = (segment == segmentCount - 1) ? bounds.size.width - segmentFrame.origin.x : FLOOR(((segment + 1) * basicSegmentWidth)) - FLOOR((segment * basicSegmentWidth)) - spacing; segmentFrame.size.height = segmentHeight; return segmentFrame; diff --git a/AppKit/CPRuleEditor/_CPRuleEditorPopUpButton.j b/AppKit/CPRuleEditor/_CPRuleEditorPopUpButton.j index a16b0d13a..d2f182647 100644 --- a/AppKit/CPRuleEditor/_CPRuleEditorPopUpButton.j +++ b/AppKit/CPRuleEditor/_CPRuleEditorPopUpButton.j @@ -3,7 +3,7 @@ * Copyright (c) 2011 Pear, Inc. All rights reserved. */ -@import @"CPPopUpButton.j" +@import "CPPopUpButton.j" var GRADIENT_START_COLOR = "#fcfcfc", GRADIENT_END_COLOR = "#dfdfdf", diff --git a/AppKit/CPSplitView.j b/AppKit/CPSplitView.j index cd6734518..53b280207 100644 --- a/AppKit/CPSplitView.j +++ b/AppKit/CPSplitView.j @@ -51,10 +51,7 @@ CPSplitViewDidResizeSubviewsNotification = @"CPSplitViewDidResizeSubviewsNotification"; CPSplitViewWillResizeSubviewsNotification = @"CPSplitViewWillResizeSubviewsNotification"; -var CPSplitViewHorizontalImage = nil, - CPSplitViewVerticalImage = nil, - - ShouldSuppressResizeNotifications = 1, +var ShouldSuppressResizeNotifications = 1, DidPostWillResizeNotification = 1 << 1, DidSuppressResizeNotification = 1 << 2; @@ -104,22 +101,16 @@ var CPSplitViewHorizontalImage = nil, + (id)themeAttributes { - return [CPDictionary dictionaryWithObjects:[1.0, 10.0, [CPColor grayColor]] - forKeys:[@"divider-thickness", @"pane-divider-thickness", @"pane-divider-color"]]; -} - -/* - @ignore -*/ -+ (void)initialize -{ - if (self !== [CPSplitView class]) - return; - - var bundle = [CPBundle bundleForClass:self]; - - CPSplitViewHorizontalImage = CPImageInBundle("CPSplitView/CPSplitViewHorizontal.png", CGSizeMake(5.0, 10.0), bundle); - CPSplitViewVerticalImage = CPImageInBundle("CPSplitView/CPSplitViewVertical.png", CGSizeMake(10.0, 5.0), bundle); + return [CPDictionary dictionaryWithObjects:[ 1.0, + 10.0, + [CPColor grayColor], + [CPNull null], + [CPNull null]] + forKeys:[ @"divider-thickness", + @"pane-divider-thickness", + @"pane-divider-color", + @"horizontal-divider-color", + @"vertical-divider-color"]]; } - (id)initWithFrame:(CGRect)aFrame @@ -202,7 +193,7 @@ var CPSplitViewHorizontalImage = nil, _originComponent = [self isVertical] ? "x" : "y"; _sizeComponent = [self isVertical] ? "width" : "height"; - _dividerImagePath = [self isVertical] ? [CPSplitViewVerticalImage filename] : [CPSplitViewHorizontalImage filename]; + _dividerImagePath = [self isVertical] ? [[self valueForThemeAttribute:@"vertical-divider-color"] filename] : [[self valueForThemeAttribute:@"horizontal-divider-color"] filename]; return changed; } diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular0.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular0.png deleted file mode 100644 index 185ae1649..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular0.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular1.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular1.png deleted file mode 100644 index 453892b24..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular1.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular2.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular2.png deleted file mode 100644 index bcbf22ce6..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular2.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular0.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular0.png deleted file mode 100644 index 6f52b1008..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular0.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular1.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular1.png deleted file mode 100644 index 8a3924309..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular1.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular2.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular2.png deleted file mode 100644 index f46d6e2b1..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarRegular2.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular0.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular0.png deleted file mode 100644 index 3db8ec41d..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular0.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular1.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular1.png deleted file mode 100644 index e42a7c458..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular1.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular2.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular2.png deleted file mode 100644 index 0a1939345..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular2.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular0.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular0.png deleted file mode 100644 index de32b01b1..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular0.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular1.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular1.png deleted file mode 100644 index e0a0bd241..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular1.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular2.png b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular2.png deleted file mode 100644 index b0e9559a1..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarRegular2.png and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif deleted file mode 100644 index 702a575ee..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif deleted file mode 100644 index 598cab3dc..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif and /dev/null differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif deleted file mode 100644 index cbd275d4c..000000000 Binary files a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif and /dev/null differ diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-bezel-center.png b/AppKit/Themes/Aristo2/Resources/level-indicator-bezel-center.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-bezel-center.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-bezel-center.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-bezel-left.png b/AppKit/Themes/Aristo2/Resources/level-indicator-bezel-left.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-bezel-left.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-bezel-left.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-bezel-right.png b/AppKit/Themes/Aristo2/Resources/level-indicator-bezel-right.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-bezel-right.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-bezel-right.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-critical-center.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-critical-center.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-critical-center.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-critical-center.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-critical-left.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-critical-left.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-critical-left.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-critical-left.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-critical-right.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-critical-right.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-critical-right.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-critical-right.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-empty-center.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-empty-center.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-empty-center.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-empty-center.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-empty-left.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-empty-left.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-empty-left.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-empty-left.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-empty-right.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-empty-right.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-empty-right.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-empty-right.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-normal-center.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-normal-center.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-normal-center.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-normal-center.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-normal-left.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-normal-left.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-normal-left.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-normal-left.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-normal-right.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-normal-right.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-normal-right.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-normal-right.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-warning-center.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-warning-center.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-warning-center.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-warning-center.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-warning-left.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-warning-left.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-warning-left.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-warning-left.png diff --git a/AppKit/Resources/CPLevelIndicator/level-indicator-segment-warning-right.png b/AppKit/Themes/Aristo2/Resources/level-indicator-segment-warning-right.png similarity index 100% rename from AppKit/Resources/CPLevelIndicator/level-indicator-segment-warning-right.png rename to AppKit/Themes/Aristo2/Resources/level-indicator-segment-warning-right.png diff --git a/AppKit/Resources/CPSplitView/CPSplitViewHorizontal.png b/AppKit/Themes/Aristo2/Resources/splitview-divider-horizontal.png similarity index 100% rename from AppKit/Resources/CPSplitView/CPSplitViewHorizontal.png rename to AppKit/Themes/Aristo2/Resources/splitview-divider-horizontal.png diff --git a/AppKit/Resources/CPSplitView/CPSplitViewVertical.png b/AppKit/Themes/Aristo2/Resources/splitview-divider-vertical.png similarity index 100% rename from AppKit/Resources/CPSplitView/CPSplitViewVertical.png rename to AppKit/Themes/Aristo2/Resources/splitview-divider-vertical.png diff --git a/AppKit/Themes/Aristo2/ThemeDescriptors.j b/AppKit/Themes/Aristo2/ThemeDescriptors.j index 8f11c7718..bd6e04945 100644 --- a/AppKit/Themes/Aristo2/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo2/ThemeDescriptors.j @@ -1332,6 +1332,8 @@ var themedButtonValues = nil, [splitView addSubview:leftView]; [splitView addSubview:rightView]; + var horizontalDividerColor = PatternImage("splitview-divider-horizontal.png", 5.0, 10.0), + verticalDividerColor = PatternImage("splitview-divider-vertical.png", 10.0, 5.0); [splitView setIsPaneSplitter:YES]; @@ -1339,7 +1341,9 @@ var themedButtonValues = nil, [ [@"divider-thickness", 1.0], [@"pane-divider-thickness", 10.0], - [@"pane-divider-color", [CPColor colorWithRed:165.0 / 255.0 green:165.0 / 255.0 blue:165.0 / 255.0 alpha:1.0]] + [@"pane-divider-color", [CPColor colorWithRed:165.0 / 255.0 green:165.0 / 255.0 blue:165.0 / 255.0 alpha:1.0]], + [@"horizontal-divider-color", horizontalDividerColor], + [@"vertical-divider-color", verticalDividerColor] ]; [self registerThemeValues:themedSplitViewValues forView:splitView]; @@ -1718,6 +1722,61 @@ var themedButtonValues = nil, return box; } ++ (CPLevelIndicator)themedLevelIndicator +{ + var levelIndicator = [[CPLevelIndicator alloc] initWithFrame:CGRectMake(0,0,100,100)], + + bezelColor = PatternColor( + [ + [@"level-indicator-bezel-left.png", 3.0, 18.0], + [@"level-indicator-bezel-center.png", 1.0, 18.0], + [@"level-indicator-bezel-right.png", 3.0, 18.0] + ]), + + emptyColor = PatternColor( + [ + [@"level-indicator-segment-empty-left.png", 3.0, 17.0], + [@"level-indicator-segment-empty-center.png", 1.0, 17.0], + [@"level-indicator-segment-empty-right.png", 3.0, 17.0] + ]), + + normalColor = PatternColor( + [ + [@"level-indicator-segment-normal-left.png", 3.0, 17.0], + [@"level-indicator-segment-normal-center.png", 1.0, 17.0], + [@"level-indicator-segment-normal-right.png", 3.0, 17.0] + ]), + + warningColor = PatternColor( + [ + [@"level-indicator-segment-warning-left.png", 3.0, 17.0], + [@"level-indicator-segment-warning-center.png", 1.0, 17.0], + [@"level-indicator-segment-warning-right.png", 3.0, 17.0] + ]), + + criticalColor = PatternColor( + [ + [@"level-indicator-segment-critical-left.png", 3.0, 17.0], + [@"level-indicator-segment-critical-center.png", 1.0, 17.0], + [@"level-indicator-segment-critical-right.png", 3.0, 17.0] + ]); + + + themeValues = + [ + [@"bezel-color", bezelColor], + [@"color-empty", emptyColor], + [@"color-normal", normalColor], + [@"color-warning", warningColor], + [@"color-critical", criticalColor], + [@"spacing", 1.0] + ]; + + [self registerThemeValues:themeValues forView:levelIndicator]; + + return levelIndicator; +} + + (_CPHUDWindowView)themedHUDWindowView {