From 0acfcee491191b573ae805a99f40398e4e92405e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 26 Feb 2008 12:31:31 -0500 Subject: [PATCH] Instead of using NSGradient, just use a PNG image so we can make ourselves 10.4 --- English.lproj/gradient.png | Bin 0 -> 2035 bytes PrintDrop.xcodeproj/project.pbxproj | 12 ++++++++++++ Source/GradientBackView.m | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 English.lproj/gradient.png diff --git a/English.lproj/gradient.png b/English.lproj/gradient.png new file mode 100644 index 0000000000000000000000000000000000000000..3f75cf1ab0a03e04cba525b81c6a876423073262 GIT binary patch literal 2035 zcmV4Tx0C=43*=JN!X8^|W=O&D>5rd+rToG9s3}Fa}3PeSa5rzn82Ly^ZAPtcr zcG%jzckQt5POBETRnRJ03+^IXYpu1`QCn*jt<{r$xDgQ1+HXC_=XcIM=gpgY^1k#AHm5j}xds46Hlipg=h z)-56f22`N{g)l-yGUA}S#kv2Tsj$)n0NPSRm9e;JqDj=K)#0MHbV{i)tGKMVv_woO z(FckC(qbB2da9@i(x}1$fb5)HQTmnBc@O{yE(vXOlV$)>2LVNW+nnADm{SY%n%OoN z5C!;729})APcxQVwj~G+z`uQ#dRoW@KmY_mCYM`T+t}DD?Ck9w9G#q9T)Vh+Rl0ZU z?$M*CXRqFUyu`lV{d|1=`~w093{(wL2Wvt?!v{x1MhzJ{YmA=TH16EBd-tBb`}Tj^bfCHU z;Gyphe}CkMqdy)y_S5m7PyBN7)af(7p8f6jbAO!w^TLITEtf9;b>;7?*UW$*lgX{D ztZi&<6?XOxj<>x2{=RbyHDt>fA;+UkAR9#wn#@MWJ**Ur6 z@42DCl&O{iAGH-o5*Hd5L|! zz5Dt2^!N4i^A89N957HNWzmF$hJ_D~h=`0D5uc)k=Ufr%zYo@kN9YeKsTDH7q#mZG{)~;K>VPoy4&0Dr^+rFcr zao3)``BL%tV;_LsNJ9{!HW^2^J zgM-zokkAlKxLOq!791AY@g$daW5Kef(8(Gy%h7QTWffwmHfhkr3Nb{R)X6T?>Tq?0 zS{-(0dnO_xA|fIpA|fIpqPv>V0Ob2LqX0lwbdA|;HUog!EFDC5xjTGMNJK0~mKKe* z&}_!7+a`^&zx;GO6N23SkQX1>oFQ}CrodTZk(=yq^c$74#Tg-5=kp;aVaHh(;dB;kS`zC{2Lz(?!6U<64nl#iAs;B(biC}iCV{q1 zj0r+J92id5`c-)p&QJvs*9i>VtsfG$b*PeP)d_rGOV51-ZynccoxMuk5c8#e2r}e@ zgj(kN;^o)+wbn*P@6#n`0t@cu{6pg+{~WhR8Amd2>Q7?dAh zr1MX3=Jn-Vy6a~S-;VE8oQ3YJpQNojbV`&P{RSE#!2Eqcv!#B=aTNLIHhq*Zi*L^M zCsBy{i7S}19W~CiKR5c}k8Z#+(yjIL-*5GkKp2Z9c{i5KYQVyLTJcQp88XzB(|Oc# z&GONZN3sHa)4$O1HD|O{_n-H?bOc8GhCyIqoEgP6=_m3p@PZSep7{iRi3~X-Pgd!- z&nG9?pPu_vzZ`1k?gxDqi7@f|Kq8d=3+t}?Pg)yld1cTr|L|nz+&A|JL5<@SgysCB zhjRsgZ!9_G^&MgJQkA^~prC-%ul>lflo*1>?2Quo0fFMG8r-}Uz|=qE>Suy8G) zQ{L&9r<>p3gIO@1u!#OeA-Z%|A*1hqYhNy@;X6jOvA;5p=*T>Wne8Kw?|;W}pg-^&m~5XGr-ML7LPr2gkeruXX>qW7mbC zb%Vwb>M#3G=4{4FW~iT(zC2&>ml6Gg`@{bJWe8e7H~63W&v1r(zJN2U_yZxIkyFJh RW6}Ts002ovPDHLkV1i^f{^9@t literal 0 HcmV?d00001 diff --git a/PrintDrop.xcodeproj/project.pbxproj b/PrintDrop.xcodeproj/project.pbxproj index 1eb4901..19e2ea9 100644 --- a/PrintDrop.xcodeproj/project.pbxproj +++ b/PrintDrop.xcodeproj/project.pbxproj @@ -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 = ""; }; 1E1626550D7388110067F3B4 /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppController.m; path = Source/AppController.m; sourceTree = ""; }; 1EE1E1D80D744BB8002999AD /* libssh2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssh2.a; path = libssh2/lib/libssh2.a; sourceTree = ""; }; + 1EE1E3E40D7482E7002999AD /* English */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = English; path = English.lproj/gradient.png; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; @@ -114,6 +116,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 1EE1E3E30D7482E7002999AD /* gradient.png */, 8D1107310486CEB800E47090 /* Info.plist */, 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, @@ -175,6 +178,7 @@ files = ( 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 1EE1E3E50D7482E7002999AD /* gradient.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -203,6 +207,14 @@ name = InfoPlist.strings; sourceTree = ""; }; + 1EE1E3E30D7482E7002999AD /* gradient.png */ = { + isa = PBXVariantGroup; + children = ( + 1EE1E3E40D7482E7002999AD /* English */, + ); + name = gradient.png; + sourceTree = ""; + }; 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { isa = PBXVariantGroup; children = ( diff --git a/Source/GradientBackView.m b/Source/GradientBackView.m index 7e92f18..cdab262 100644 --- a/Source/GradientBackView.m +++ b/Source/GradientBackView.m @@ -29,11 +29,16 @@ - (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)]; -- 2.43.5