Revision: 18242
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18242&view=rev
Author:   hofman
Date:     2011-11-26 18:26:06 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Darker gradients for main or key window, not active app. Avoid leak. Call self.

Modified Paths:
--------------
    trunk/bibdesk/BDSKAddressTextFieldCell.m

Modified: trunk/bibdesk/BDSKAddressTextFieldCell.m
===================================================================
--- trunk/bibdesk/BDSKAddressTextFieldCell.m    2011-11-26 13:02:58 UTC (rev 
18241)
+++ trunk/bibdesk/BDSKAddressTextFieldCell.m    2011-11-26 18:26:06 UTC (rev 
18242)
@@ -60,19 +60,20 @@
        [[NSColor colorWithCalibratedWhite:1.0 alpha:0.394] set];
        [[NSBezierPath bezierPathWithRoundedRect:outerShadowRect xRadius:3.6 
yRadius:3.6] fill];
        
-       if ([NSApp isActive])
+       if ([NSApp isActive] && ([[controlView window] isMainWindow] || 
[[controlView window] isKeyWindow]))
                gradient = [[NSGradient alloc] initWithStartingColor:[NSColor 
colorWithCalibratedWhite:0.24 alpha:1.0] endingColor:[NSColor 
colorWithCalibratedWhite:0.374 alpha:1.0]];
        else
                gradient = [[NSGradient alloc] initWithStartingColor:[NSColor 
colorWithCalibratedWhite:0.55 alpha:1.0] endingColor:[NSColor 
colorWithCalibratedWhite:0.558 alpha:1.0]];
        [gradient drawInBezierPath:[NSBezierPath 
bezierPathWithRoundedRect:outlineRect xRadius:3.6 yRadius:3.6] angle:90];
-       
+       [gradient release];
+    
        [[NSColor colorWithCalibratedWhite:0.88 alpha:1.0] set];
        [[NSBezierPath bezierPathWithRoundedRect:innerShadowRect xRadius:2.9 
yRadius:2.9] fill];
        
        [[NSColor whiteColor] set];
        [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(cellFrame, 1.0, 
2.0) xRadius:2.6 yRadius:2.6] fill];
        
-    [super drawInteriorWithFrame:outlineRect inView:controlView];
+    [self drawInteriorWithFrame:outlineRect inView:controlView];
     
        if ([self showsFirstResponder]) {       
                [NSGraphicsContext saveGraphicsState];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to