Re: NSShadow changes on 10.5.2?
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