• 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: NSShadow changes on 10.5.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSShadow changes on 10.5.2?


  • Subject: Re: NSShadow changes on 10.5.2?
  • From: Seth Willits <email@hidden>
  • Date: Sat, 16 Feb 2008 20:48:51 -0800

On Feb 15, 2008, at 5:43 AM, Jim Correia wrote:

This is the behavior I am seeing as well. The shadows only look bad on 10.5.2 (which now actually draws them at the offset you pass in.)

I'd still like to derive the function

	f(actual offset) = 10.5.1/10.4.x offset

so that I don't have to hand tweak every shadow offset in my app so that they look the same on both OS releases.


Although you could get fancy with some method swizzling, I'm simply thinking of doing this for now…


@implementation NSShadow (OffsetHack)

- (void)setShadowOffsetCorrected:(NSSize)size;
{
	const double AppKitVersionNumber_10_5_2 = 949.27;

	if (NSAppKitVersionNumber >= AppKitVersionNumber_10_5_2) {
		size.width -= 1.0;
		size.height += 1.0;
	}

	[self setShadowOffset:size];
}

@end



I never noticed there was a bug with 10.5.1 and earlier. It seemed perfectly fine to me. Still does. Offset of {0, 0} was basically hidden, {1, -1} was just one pixel wide to bottom right corner... It seems like a bug to me as it is now, not correct.


-- Seth Willits




_______________________________________________

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: NSShadow changes on 10.5.2?
      • From: Jim Correia <email@hidden>
References: 
 >NSShadow changes on 10.5.2? (From: Jim Correia <email@hidden>)
 >Re: NSShadow changes on 10.5.2? (From: João Pavão <email@hidden>)
 >Re: NSShadow changes on 10.5.2? (From: Uli Kusterer <email@hidden>)
 >Re: NSShadow changes on 10.5.2? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Strategies to prevent class name clashes
  • Next by Date: Re: NSShadow changes on 10.5.2?
  • Previous by thread: Re: [Workaround] NSShadow changes on 10.5.2?
  • Next by thread: Re: NSShadow changes on 10.5.2?
  • Index(es):
    • Date
    • Thread