From 11c398c047d4e737a59c70f13de3cde3a788810a Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Fri, 1 Jan 2010 22:31:34 -0500 Subject: [PATCH] Fix CGS warnings on 10.6 --- ITSpinAndZoomWindowEffect.m | 2 ++ ITStatusItem.m | 4 ++-- ITZoomWindowEffect.m | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ITSpinAndZoomWindowEffect.m b/ITSpinAndZoomWindowEffect.m index 44b3ad3..910a21a 100644 --- a/ITSpinAndZoomWindowEffect.m +++ b/ITSpinAndZoomWindowEffect.m @@ -198,6 +198,8 @@ NSPoint translation; NSRect winFrame = [_window frame]; + scale = MAX(scale, 0.000001); + translation.x = (winFrame.size.width / 2.0); translation.y = (winFrame.size.height / 2.0); transform = CGAffineTransformMakeTranslation(translation.x, translation.y); diff --git a/ITStatusItem.m b/ITStatusItem.m index 0978705..fade99c 100644 --- a/ITStatusItem.m +++ b/ITStatusItem.m @@ -100,14 +100,14 @@ static BOOL _ITStatusItemShouldKillShadow = NO; - (NSImage *)alternateImage { if ([super respondsToSelector:@selector(alternateImage)]) { - return [(id <_ITStatusItemNSStatusItemPantherCompatability>)super alternateImage]; + return [super alternateImage]; } return [(NSButton *)[self _button] alternateImage]; } - (void)setAlternateImage:(NSImage*)image { if ([super respondsToSelector:@selector(setAlternateImage:)]) { - [(id <_ITStatusItemNSStatusItemPantherCompatability>)super setAlternateImage:image]; + [super setAlternateImage:image]; return; } [(NSButton *)[self _button] setAlternateImage:image]; diff --git a/ITZoomWindowEffect.m b/ITZoomWindowEffect.m index bde7a2d..888e37a 100644 --- a/ITZoomWindowEffect.m +++ b/ITZoomWindowEffect.m @@ -197,6 +197,8 @@ NSPoint translation; NSRect winFrame = [_window frame]; + Zoom = MAX(Zoom, 0.000001); + translation.x = (winFrame.size.width / 2.0); translation.y = (winFrame.size.height / 2.0); transform = CGAffineTransformMakeTranslation(translation.x, translation.y); -- 2.20.1