From 9dbfa99284f5f4b64c81398a777beffa0b93d995 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 20 Jan 2013 17:14:44 +0000 Subject: [PATCH] Lint. --- AppKit/CPLevelIndicator.j | 12 ++++++------ AppKit/CPProgressIndicator.j | 2 +- AppKit/CPSearchField.j | 13 +++++++------ AppKit/CPShadowView.j | 11 ++++++----- AppKit/CPSplitView.j | 20 ++++++++++---------- AppKit/CPTheme.j | 2 +- 6 files changed, 31 insertions(+), 29 deletions(-) diff --git a/AppKit/CPLevelIndicator.j b/AppKit/CPLevelIndicator.j index 59fc3c6b4..56b5fbbdc 100644 --- a/AppKit/CPLevelIndicator.j +++ b/AppKit/CPLevelIndicator.j @@ -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"]; } diff --git a/AppKit/CPProgressIndicator.j b/AppKit/CPProgressIndicator.j index e916db10b..1c1e651f8 100644 --- a/AppKit/CPProgressIndicator.j +++ b/AppKit/CPProgressIndicator.j @@ -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"]]; } diff --git a/AppKit/CPSearchField.j b/AppKit/CPSearchField.j index 41d3f3bb9..62c2b4fdb 100644 --- a/AppKit/CPSearchField.j +++ b/AppKit/CPSearchField.j @@ -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 diff --git a/AppKit/CPShadowView.j b/AppKit/CPShadowView.j index 64fd26f23..08a561701 100644 --- a/AppKit/CPShadowView.j +++ b/AppKit/CPShadowView.j @@ -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); } diff --git a/AppKit/CPSplitView.j b/AppKit/CPSplitView.j index 3e0913de1..c45807d25 100644 --- a/AppKit/CPSplitView.j +++ b/AppKit/CPSplitView.j @@ -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 diff --git a/AppKit/CPTheme.j b/AppKit/CPTheme.j index 1b74f6081..a50ec2502 100644 --- a/AppKit/CPTheme.j +++ b/AppKit/CPTheme.j @@ -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