This commit is contained in:
Alexander Ljungberg
2013-01-20 17:14:44 +00:00
parent 3c684404ed
commit 9dbfa99284
6 changed files with 31 additions and 29 deletions
+6 -6
View File
@@ -61,12 +61,12 @@ CPRatingLevelIndicatorStyle = 3;
+ (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"];
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"];
}
+1 -1
View File
@@ -76,7 +76,7 @@ var CPProgressIndicatorSpinningStyleColors = nil;
+ (CPDictionary)themeAttributes
{
return [CPDictionary dictionaryWithObjects:[[CPNull null],[CPNull null],25,[CPNull null],[CPNull null], [CPNull null], [CPNull null]]
return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], 25, [CPNull null], [CPNull null], [CPNull null], [CPNull null]]
forKeys:[@"inderterminate-bar-color", @"bar-color",@"default-height",@"bezel-color",@"spinning-mini-gif", @"spinning-small-gif", @"spinning-regular-gif"]];
}
+7 -6
View File
@@ -66,12 +66,13 @@ var RECENT_SEARCH_PREFIX = @" ";
+ (CPDictionary)themeAttributes
{
return [CPDictionary dictionaryWithJSObject:{
@"image-search": [CPNull null],
@"image-find": [CPNull null],
@"image-cancel": [CPNull null],
@"image-cancel-pressed": [CPNull null]
}];
return [CPDictionary dictionaryWithJSObject:
{
@"image-search": [CPNull null],
@"image-find": [CPNull null],
@"image-cancel": [CPNull null],
@"image-cancel-pressed": [CPNull null]
}];
}
- (id)initWithFrame:(CGRect)frame
+6 -5
View File
@@ -50,16 +50,17 @@ CPThemeStateShadowViewHeavy = CPThemeState("shadowview-style-heavy");
+ (id)themeAttributes
{
return [CPDictionary dictionaryWithJSObject:{
@"bezel-color": [CPNull null],
@"content-inset": CGInsetMakeZero()
}];
return [CPDictionary dictionaryWithJSObject:
{
@"bezel-color": [CPNull null],
@"content-inset": CGInsetMakeZero()
}];
}
+ (CGRect)frameForContentFrame:(CGRect)aFrame withWeight:(CPShadowWeight)aWeight
{
var shadowView = [CPShadowView new],
inset = [shadowView valueForThemeAttribute:@"content-inset" inState:(aWeight == CPLightShadow) ? CPThemeStateShadowViewLight : CPThemeStateShadowViewHeavy];
inset = [shadowView valueForThemeAttribute:@"content-inset" inState:(aWeight == CPLightShadow) ? CPThemeStateShadowViewLight : CPThemeStateShadowViewHeavy];
return CGRectMake(_CGRectGetMinX(aFrame) - inset.left, _CGRectGetMinY(aFrame) - inset.top, _CGRectGetWidth(aFrame) + inset.left + inset.right, _CGRectGetHeight(aFrame) + inset.top + inset.bottom);
}
+10 -10
View File
@@ -104,16 +104,16 @@ var ShouldSuppressResizeNotifications = 1,
+ (id)themeAttributes
{
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"]];
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
+1 -1
View File
@@ -147,7 +147,7 @@ var CPThemesByName = { },
className = [aClass defaultThemeClass];
else if ([aClass respondsToSelector:@selector(themeClass)])
{
CPLog.warn(@"%@ themeClass is deprecated in favor of defaultThemeClass",CPStringFromClass(aClass));
CPLog.warn(@"%@ themeClass is deprecated in favor of defaultThemeClass", CPStringFromClass(aClass));
className = [aClass themeClass];
}
else