Instead of using NSGradient, just use a PNG image so we can make ourselves 10.4
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 26 Feb 2008 17:31:31 +0000 (12:31 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 26 Feb 2008 17:31:31 +0000 (12:31 -0500)
English.lproj/gradient.png [new file with mode: 0644]
PrintDrop.xcodeproj/project.pbxproj
Source/GradientBackView.m

diff --git a/English.lproj/gradient.png b/English.lproj/gradient.png
new file mode 100644 (file)
index 0000000..3f75cf1
Binary files /dev/null and b/English.lproj/gradient.png differ
index 1eb490171c26d29df80e4e5e9d7416819cf96421..19e2ea9985394787a39fb54663459baec058bf5c 100644 (file)
@@ -11,6 +11,7 @@
                1E1625410D736EF20067F3B4 /* DraggableImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E1625400D736EF20067F3B4 /* DraggableImageView.m */; };
                1E1626560D7388110067F3B4 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E1626550D7388110067F3B4 /* AppController.m */; };
                1EE1E1D90D744BB8002999AD /* libssh2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EE1E1D80D744BB8002999AD /* libssh2.a */; };
+               1EE1E3E50D7482E7002999AD /* gradient.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EE1E3E30D7482E7002999AD /* gradient.png */; };
                8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
                8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
                8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -28,6 +29,7 @@
                1E1626540D7388110067F3B4 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = Source/AppController.h; sourceTree = "<group>"; };
                1E1626550D7388110067F3B4 /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppController.m; path = Source/AppController.m; sourceTree = "<group>"; };
                1EE1E1D80D744BB8002999AD /* libssh2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssh2.a; path = libssh2/lib/libssh2.a; sourceTree = "<group>"; };
+               1EE1E3E40D7482E7002999AD /* English */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = English; path = English.lproj/gradient.png; sourceTree = "<group>"; };
                29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
                29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
                29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
                29B97317FDCFA39411CA2CEA /* Resources */ = {
                        isa = PBXGroup;
                        children = (
+                               1EE1E3E30D7482E7002999AD /* gradient.png */,
                                8D1107310486CEB800E47090 /* Info.plist */,
                                089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
                                29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
                        files = (
                                8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
                                8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+                               1EE1E3E50D7482E7002999AD /* gradient.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        name = InfoPlist.strings;
                        sourceTree = "<group>";
                };
+               1EE1E3E30D7482E7002999AD /* gradient.png */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               1EE1E3E40D7482E7002999AD /* English */,
+                       );
+                       name = gradient.png;
+                       sourceTree = "<group>";
+               };
                29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
                        isa = PBXVariantGroup;
                        children = (
index 7e92f1863dadd4f727c74af893a7c2d27834f6e5..cdab2629dfa5abf6471a969b744f6a2878bc8e9d 100644 (file)
 
 - (void)drawRect:(NSRect)rect
 {
+       /*
        rect = [self bounds];
        NSColor *end = [NSColor colorWithDeviceRed:0.773 green:0.773 blue:0.773 alpha:1.0];
        NSColor *start = [NSColor colorWithDeviceRed:0.588 green:0.588 blue:0.588 alpha:1.0];
        NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:start endingColor:end];
        [gradient drawInRect:rect angle:90];
+       */
+       rect = [self bounds];
+       NSImage *gradient = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"gradient" ofType:@"png"]];
+       [gradient drawInRect:rect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
        
        [[NSColor blackColor] set];
        [NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x, rect.origin.y) toPoint:NSMakePoint(rect.origin.x + rect.size.width, rect.origin.y)];