• 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: NSMenuItem and images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem and images


  • Subject: Re: NSMenuItem and images
  • From: Kristopher Matthews <email@hidden>
  • Date: Mon, 28 Apr 2008 06:39:15 -0500

I don't see any way to do it, but my initial concern is that user could modify their system to change that height - maybe for visually impaired users.

Also, as Adam points out - there's no guarantee that this height will not change in a future release.

Oh well,

#define kMenuItemImageSize 16

it is. :)

On Apr 27, 2008, at 11:44 PM, Adam R. Maxwell wrote:


On Apr 27, 2008, at 9:29 PM, Seth Willits wrote:

On Apr 27, 2008, at 4:03 PM, Kristopher Matthews wrote:

I have an NSPopUpButton populated with some NSMenuItems that have images. I'm trying to determine the proper dimensions for the image. I'm getting the image from [NSWorkspace: iconForFile], which appears to be returning them at 32x32, much too large. Manually resizing to 16x16 works well, but I don't want to hardcode that image size.

Why not? If you want them to be 16x16 (which you do) you kinda have to set them to be 16x16...

Sure, but you have no way of knowing what the correct size is for an NSMenuItem (assuming you want a normal size). I set all menu item images to 16x16 since that looks approximately correct, but I'd rather have NSMenuItem draw the image at the correct size, or have something like -[NSMenuItem height] to get a nominal, future-proof size.


--
adam
_______________________________________________

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

_______________________________________________

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: NSMenuItem and images
      • From: "Hamish Allan" <email@hidden>
References: 
 >NSMenuItem and images (From: Kristopher Matthews <email@hidden>)
 >Re: NSMenuItem and images (From: Seth Willits <email@hidden>)
 >Re: NSMenuItem and images (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: AddressBook.framework & binding
  • Next by Date: Re: NSMenuItem and images
  • Previous by thread: Re: NSMenuItem and images
  • Next by thread: Re: NSMenuItem and images
  • Index(es):
    • Date
    • Thread