• 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
NSButton image drawn 1 pixel too high
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSButton image drawn 1 pixel too high


  • Subject: NSButton image drawn 1 pixel too high
  • From: James Walker <email@hidden>
  • Date: Wed, 04 Mar 2009 12:59:42 -0800

I guess I'm being picky, but it bugs me... I have a 23x23 square button, displaying a 17x17 image, with NSImageOnly positioning. It should center perfectly, with 2 pixels between the image and the border on each side, but in fact there's 1 pixel above and 3 below. I can work around it by subclassing NSButtonCell and reimplementing drawInteriorWithFrame:inView:, but I wondered if there is a better way?
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________


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


  • Prev by Date: Checking for NULL (was "Re: Can't get setDelegate to work...")
  • Next by Date: Re: Newbie: Learning path for my GTD app...
  • Previous by thread: Re: Saving a plist file from a thumbdrive
  • Next by thread: Doing NSStringDrawingTruncatesLastVisibleLine with NSLayoutManger
  • Index(es):
    • Date
    • Thread