diff --git a/Recessed Source List.xcodeproj/project.pbxproj b/Recessed Source List.xcodeproj/project.pbxproj index 7544e7a..75b3bb8 100644 --- a/Recessed Source List.xcodeproj/project.pbxproj +++ b/Recessed Source List.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 4C12485716593CEB000B1860 /* SourceListBackground.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 4C12485616593CEB000B1860 /* SourceListBackground.tiff */; }; 9DFE281813D9B5C200BAED67 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DFE281713D9B5C200BAED67 /* Cocoa.framework */; }; 9DFE282213D9B5C200BAED67 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9DFE282013D9B5C200BAED67 /* InfoPlist.strings */; }; 9DFE282413D9B5C200BAED67 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DFE282313D9B5C200BAED67 /* main.m */; }; @@ -20,6 +21,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 4C12485616593CEB000B1860 /* SourceListBackground.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = SourceListBackground.tiff; sourceTree = ""; }; 9DFE281313D9B5C200BAED67 /* Recessed Source List.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Recessed Source List.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 9DFE281713D9B5C200BAED67 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 9DFE281A13D9B5C200BAED67 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -97,6 +99,7 @@ 9DFE282913D9B5C200BAED67 /* Recessed_Source_ListAppDelegate.h */, 9DFE282A13D9B5C200BAED67 /* Recessed_Source_ListAppDelegate.m */, 9DFE282C13D9B5C200BAED67 /* MainMenu.xib */, + 4C12485616593CEB000B1860 /* SourceListBackground.tiff */, 9DFE281E13D9B5C200BAED67 /* Supporting Files */, ); name = "Demo App"; @@ -182,6 +185,7 @@ 9DFE282213D9B5C200BAED67 /* InfoPlist.strings in Resources */, 9DFE282813D9B5C200BAED67 /* Credits.rtf in Resources */, 9DFE282E13D9B5C200BAED67 /* MainMenu.xib in Resources */, + 4C12485716593CEB000B1860 /* SourceListBackground.tiff in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Recessed Source List/Controls/JLNRecessedOutlineView.h b/Recessed Source List/Controls/JLNRecessedOutlineView.h new file mode 100644 index 0000000..c027623 --- /dev/null +++ b/Recessed Source List/Controls/JLNRecessedOutlineView.h @@ -0,0 +1,55 @@ +// +// JLNRecessedOutlineView.h +// JLNRecessedOutlineView +// +// Created by Manuel "StuFF mc" Carrasco Molina on 11/18/12. +// Copyright 2012 Joshua Nozzi & Manuel Carrasco Molina. All rights reserved. +// +// This software is supplied to you by Joshua Nozzi in consideration +// of your agreement to the following terms, and your use, installation, +// modification or redistribution of this software constitutes +// acceptance of these terms. If you do not agree with these terms, +// please do not use, install, modify or redistribute this software. +// +// In consideration of your agreement to abide by the following terms, +// and subject to these terms, Joshua Nozzi grants you a personal, +// non-exclusive license, to use, reproduce, modify and redistribute +// the software, with or without modifications, in source and/or binary +// forms; provided that if you redistribute the software in its entirety +// and without modifications, you must retain this notice and the +// following text and disclaimers in all such redistributions of the +// software, and that in all cases attribution of Joshua Nozzi as the +// original author of the source code shall be included in all such +// resulting software products or distributions. Neither the name, +// trademarks, service marks or logos of Joshua Nozzi may be used to +// endorse or promote products derived from the software without specific +// prior written permission from Joshua Nozzi. Except as expressly stated +// in this notice, no other rights or licenses, express or implied, are +// granted by Joshua Nozzi herein, including but not limited to any patent +// rights that may be infringed by your derivative works or by other works +// in which the software may be incorporated. +// +// THIS SOFTWARE IS PROVIDED BY JOSHUA NOZZI ON AN "AS IS" BASIS. JOSHUA +// NOZZI MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT +// LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE OR ITS USE +// AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. +// +// IN NO EVENT SHALL JOSHUA NOZZI BE LIABLE FOR ANY SPECIAL, INDIRECT, +// INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE +// USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE SOFTWARE, +// HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING +// NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF JOSHUA NOZZI HAS +// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + + +#import + + +@interface JLNRecessedOutlineView : NSOutlineView + + +@end diff --git a/Recessed Source List/Controls/JLNRecessedOutlineView.m b/Recessed Source List/Controls/JLNRecessedOutlineView.m new file mode 100644 index 0000000..dce7f81 --- /dev/null +++ b/Recessed Source List/Controls/JLNRecessedOutlineView.m @@ -0,0 +1,85 @@ +// +// JLNRecessedOutlineView.h +// JLNRecessedOutlineView +// +// Created by Manuel "StuFF mc" Carrasco Molina on 11/18/12. +// Copyright 2012 Joshua Nozzi & Manuel Carrasco Molina. All rights reserved. +// +// This software is supplied to you by Joshua Nozzi in consideration +// of your agreement to the following terms, and your use, installation, +// modification or redistribution of this software constitutes +// acceptance of these terms. If you do not agree with these terms, +// please do not use, install, modify or redistribute this software. +// +// In consideration of your agreement to abide by the following terms, +// and subject to these terms, Joshua Nozzi grants you a personal, +// non-exclusive license, to use, reproduce, modify and redistribute +// the software, with or without modifications, in source and/or binary +// forms; provided that if you redistribute the software in its entirety +// and without modifications, you must retain this notice and the +// following text and disclaimers in all such redistributions of the +// software, and that in all cases attribution of Joshua Nozzi as the +// original author of the source code shall be included in all such +// resulting software products or distributions. Neither the name, +// trademarks, service marks or logos of Joshua Nozzi may be used to +// endorse or promote products derived from the software without specific +// prior written permission from Joshua Nozzi. Except as expressly stated +// in this notice, no other rights or licenses, express or implied, are +// granted by Joshua Nozzi herein, including but not limited to any patent +// rights that may be infringed by your derivative works or by other works +// in which the software may be incorporated. +// +// THIS SOFTWARE IS PROVIDED BY JOSHUA NOZZI ON AN "AS IS" BASIS. JOSHUA +// NOZZI MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT +// LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE OR ITS USE +// AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. +// +// IN NO EVENT SHALL JOSHUA NOZZI BE LIABLE FOR ANY SPECIAL, INDIRECT, +// INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE +// USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE SOFTWARE, +// HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING +// NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF JOSHUA NOZZI HAS +// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + + +#import "JLNRecessedOutlineView.h" + + +@implementation JLNRecessedOutlineView + + +- (void)drawBackgroundInClipRect:(NSRect)clipRect +{ + + // Super first + [super drawBackgroundInClipRect:clipRect]; + + // Figure out right edge of row, leaving enough room for a 4px gradient + NSRect rightEdge = clipRect; + rightEdge.size.width = 4.0; + rightEdge.origin.x = NSMaxX([self bounds]) - 4.0; + + // Does the clip rect intersect enough of the right edge? + if (NSIntersectsRect(clipRect, rightEdge)) + { + + // Create the gradient (89, 91, 93, 95) + NSGradient * gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor colorWithCalibratedWhite:0.89 alpha:1.0] + endingColor:[NSColor colorWithCalibratedWhite:0.95 alpha:1.0]] autorelease]; + + // Set clip and draw the gradient + [NSGraphicsContext saveGraphicsState]; + [[NSBezierPath bezierPathWithRect:clipRect] setClip]; + [gradient drawInRect:rightEdge angle:180]; + [NSGraphicsContext restoreGraphicsState]; + + } + +} + + +@end diff --git a/Recessed Source List/Recessed_Source_ListAppDelegate.m b/Recessed Source List/Recessed_Source_ListAppDelegate.m index 3335f5a..c73c6db 100644 --- a/Recessed Source List/Recessed_Source_ListAppDelegate.m +++ b/Recessed Source List/Recessed_Source_ListAppDelegate.m @@ -94,7 +94,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification // Kick the table view [tableView reloadData]; - + + NSColor *patternColor = [NSColor colorWithPatternImage:[NSImage imageNamed:@"SourceListBackground.tiff"]]; + tableView.backgroundColor = patternColor; } diff --git a/Recessed Source List/SourceListBackground.tiff b/Recessed Source List/SourceListBackground.tiff new file mode 100644 index 0000000..863ac8c Binary files /dev/null and b/Recessed Source List/SourceListBackground.tiff differ diff --git a/Recessed Source List/en.lproj/MainMenu.xib b/Recessed Source List/en.lproj/MainMenu.xib index f775d7a..c762aad 100644 --- a/Recessed Source List/en.lproj/MainMenu.xib +++ b/Recessed Source List/en.lproj/MainMenu.xib @@ -1,11 +1,11 @@ - 1070 - 11A511 - 1592 - 1138 - 566.00 + 1080 + 12C3006 + 2844 + 1187.34 + 625.00 YES @@ -13,27 +13,27 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.WebKitIBPlugin - + YES - 1592 - 513 + 2844 + 1810 YES - NSScroller - NSSplitView - NSMenuItem + NSCustomObject + NSCustomView NSMenu + NSMenuItem NSScrollView - NSTextFieldCell + NSScroller + NSSplitView + NSTableColumn NSTableView - WebView - NSCustomView - NSCustomObject + NSTextFieldCell NSView NSWindowTemplate - NSTableColumn + WebView YES @@ -41,11 +41,8 @@ com.apple.WebKitIBPlugin - YES - - YES - - + PluginDependencyRecalculationVersion + YES @@ -263,7 +260,7 @@ YES - 4370 + 274 YES @@ -280,6 +277,8 @@ _NS:1197 YES + NO + YES -2147483392 @@ -293,7 +292,7 @@ 40 1000 - 75628096 + 75497536 2048 @@ -316,7 +315,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -391,6 +390,7 @@ _NS:1214 + NO _doScroller: 0.99776286353467558 @@ -403,6 +403,7 @@ _NS:1216 + NO 1 _doScroller: @@ -419,6 +420,9 @@ QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 {175, 447} @@ -469,7 +473,7 @@ WebKitDefaultFontSize WebKitMinimumFontSize - + YES @@ -508,6 +512,30 @@ YES + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 495 + performMiniaturize: @@ -524,14 +552,6 @@ 39 - - - orderFrontStandardAboutPanel: - - - - 142 - performZoom: @@ -565,28 +585,28 @@ 370 - - terminate: - - + + window + + - 449 + 532 - delegate - - + tableView + + - 495 + 547 - window + webView - + - 532 + 548 @@ -604,29 +624,15 @@ 546 - - - tableView - - - - 547 - - - - webView - - - - 548 - YES 0 - + + YES + @@ -921,7 +927,7 @@ 58.IBPluginDependency 92.IBPluginDependency - + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1016,7 +1022,7 @@ webView window - + YES NSTableView WebView @@ -1031,7 +1037,7 @@ webView window - + YES tableView @@ -1087,10 +1093,10 @@ NSMenuCheckmark NSMenuMixedState - + YES - {9, 8} - {7, 2} + {11, 11} + {10, 3}