• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage glowing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage glowing


  • Subject: Re: NSImage glowing
  • From: Wim Lewis <email@hidden>
  • Date: Wed, 05 Nov 2014 17:53:54 -0800

On Nov 5, 2014, at 3:43 PM, Alex Kac <email@hidden> wrote:
> BUT, in this case I’m just trying to get the glow on selected images, so when I look at the code below all I see is that we’re getting the bitmap and drawing it. I’m not understanding how that gets a glow.


It’s applied by NSButtonCell, which knows that if it’s in the selected state and its image is marked as a template image (or some set of conditions like that), then it should apply the glow when drawing.

I take it you’re trying to get this effect in some place other than inside a button? It’s not unreasonable to use an NSCell instance elsewhere— that’s essentially what cells are for, to abstract away some of the drawing behavior from the control view that uses them.

I think NSButtonCell uses NSSetFocusRingStyle() to provide the actual effect, but there may be additional magic in there.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSImage glowing
      • From: Lee Ann Rucker <email@hidden>
References: 
 >NSImage glowing (From: Alex Kac <email@hidden>)
 >Re: NSImage glowing (From: Lee Ann Rucker <email@hidden>)
 >Re: NSImage glowing (From: Alex Kac <email@hidden>)

  • Prev by Date: auto layout exception: Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil
  • Next by Date: Re: NSImage glowing
  • Previous by thread: Re: NSImage glowing
  • Next by thread: Re: NSImage glowing
  • Index(es):
    • Date
    • Thread