Skip to content

Commit

Permalink
Adding a border around the syntax highlighting views
Browse files Browse the repository at this point in the history
  • Loading branch information
mmattozzi committed May 14, 2012
1 parent c6df0ad commit 0c2bfd1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CocoaRestClient.xcodeproj/project.pbxproj
Expand Up @@ -24,6 +24,7 @@
AF074F5D10F595AF00EE44D8 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = AF074F5710F595AF00EE44D8 /* SBJsonWriter.m */; };
AF1FC48410F435BD00ED5A57 /* CocoaRestClientAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* CocoaRestClientAppDelegate.m */; };
AF7A149B113B583A00F0D6F5 /* cocoaRestClient.icns in Resources */ = {isa = PBXBuildFile; fileRef = AF7A149A113B583A00F0D6F5 /* cocoaRestClient.icns */; };
AF89587615608E9D0079B379 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF895874156088610079B379 /* QuartzCore.framework */; };
AFBB7D4714F9587A00424C12 /* TabbingTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = AFBB7D4614F9587A00424C12 /* TabbingTableView.m */; };
AFBB7D4B14F98B4000424C12 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = AFBB7D4914F98B4000424C12 /* Preferences.xib */; };
AFBB7D4E14F98C1B00424C12 /* PreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = AFBB7D4D14F98C1B00424C12 /* PreferencesController.m */; };
Expand Down Expand Up @@ -91,6 +92,7 @@
AF074F5710F595AF00EE44D8 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SBJsonWriter.m; path = JSON/SBJsonWriter.m; sourceTree = "<group>"; };
AF2D9EFF145F908100B8220F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
AF7A149A113B583A00F0D6F5 /* cocoaRestClient.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = cocoaRestClient.icns; sourceTree = "<group>"; };
AF895874156088610079B379 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
AFBB7D4514F9587A00424C12 /* TabbingTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TabbingTableView.h; path = view/TabbingTableView.h; sourceTree = "<group>"; };
AFBB7D4614F9587A00424C12 /* TabbingTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TabbingTableView.m; path = view/TabbingTableView.m; sourceTree = "<group>"; };
AFBB7D4A14F98B4000424C12 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Preferences.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,6 +128,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AF89587615608E9D0079B379 /* QuartzCore.framework in Frameworks */,
5704EED0155C7BF400C55656 /* WebKit.framework in Frameworks */,
5704EE6A155B533200C55656 /* libicucore.dylib in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
Expand Down Expand Up @@ -186,6 +189,7 @@
29B97314FDCFA39411CA2CEA /* CocoaRestClient */ = {
isa = PBXGroup;
children = (
AF895874156088610079B379 /* QuartzCore.framework */,
5704EECF155C7BF400C55656 /* WebKit.framework */,
5704EE69155B533200C55656 /* libicucore.dylib */,
AF2D9EFF145F908100B8220F /* Security.framework */,
Expand Down
11 changes: 11 additions & 0 deletions CocoaRestClientAppDelegate.m
Expand Up @@ -120,6 +120,15 @@ - (void) setRawRequestInput:(BOOL)value{

}

+ (void) addBorderToView:(NSView *)view {
CGColorRef borderColor = (CGColorRef) CGColorCreateGenericRGB(0.745f, 0.745f, 0.745f, 1.0f);
CALayer *layer = [CALayer layer];
layer.borderColor = borderColor;
[view setWantsLayer:YES];
view.layer = layer;
view.layer.borderWidth = 1.0f;
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[methodButton removeAllItems];
[methodButton addItemWithTitle:@"GET"];
Expand Down Expand Up @@ -151,6 +160,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[paramsTableView setDoubleAction:@selector(doubleClickedParamsRow:)];
[filesTableView setDoubleAction:@selector(doubleClickedFileRow:)];

[CocoaRestClientAppDelegate addBorderToView:self.responseView];
[CocoaRestClientAppDelegate addBorderToView:self.requestView];
[self initHighlightedViews];
}

Expand Down

0 comments on commit 0c2bfd1

Please sign in to comment.