Oh, and for the app losing focus, you can use: [NSApp isActive] to decide 
whether to draw the ring or not. Then in my app delegate I use 
-applicationWillResignActive: to trigger a redraw.

Martin

On 5, Feb, 2012, at 02:20 AM, Quincey Morris wrote:

> On Feb 4, 2012, at 16:17 , Graham Cox wrote:
> 
> 
> The one issue this doesn't solve is that of making room around the view to 
> draw the focus ring. If one or more edges of the view are flush with the edge 
> of the window, the exterior ring looks ugly.
> 
> In the past, I've sometimes taken the approach of drawing the focus ring 
> *inside* the view. (Use the view bounds rect, inset by 1.0, to draw the focus 
> ring, and don't lock focus on the superview, of course.) It looks pretty good 
> -- it's slightly transparent so it doesn't obscure the content much. However, 
> with this approach, there's apparently no way to take advantage of the spiffy 
> new Lion methods for focus rings. It's also less than ideal during an 
> inertial scroll "bounce".
> 
> 
> I think you also need to force an update when the app is deactivated. The 
> window is still the key window, but the focus ring shouldn't be drawn.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer 
    Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to