On Jan 16, 2012, at 10:29, Christiaan Hofman wrote:

> Looking into it, it does not seem to be a problem. It seems to always 
> calculate the size at least as big as the clipview, and I cannot reproduce 
> any problems. I am not sure why this was done in the past, perhaps when the 
> frame calculation was different, or perhaps it was a 10.4 problem.

I'd guess it was due to frame calculation changes.  I know when I rewrote my 
stuff to use -resizeWithOldSuperviewSize: I found a few inconsistencies in 
layout calculations that had been there a long time.  Adding NSScrollView made 
everything more random, since autohiding scrollers are flaky.

> Another small problem is that you draw the blue gradient only when the window 
> is key. That's wrong, it should also be blue when the window is main but not 
> key, e.g. when a utility panel is key.

Thanks, I forgot about that!

> I always wondered how the color would know how it should draw, how would it 
> know about the window? Is this some private property of graphics contexts?

Yeah, from looking at Runtime Browser, NSWindowGraphicsContext knows its window 
number.  Even if the gradient could be done using a pattern color, I don't 
think there's enough public API in Cocoa (and maybe in CG) to draw that color.  
Another problem is figuring out the extent of the gradient to draw, say if 
you're only getting a small/dirty rect in NSRectFill.

BTW, last nightly build failed, but I can't scroll through the xcodebuild 
transcript on my phone.



------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to