summaryrefslogtreecommitdiff
path: root/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m')
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m18
1 files changed, 7 insertions, 11 deletions
diff --git a/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m b/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m
index c316f6973..8b71b7703 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m
+++ b/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m
@@ -6,6 +6,7 @@
// Copyright 2005 Positive Spin Media. All rights reserved.
//
+#import <math.h>
#import "PSMOverflowPopUpButton.h"
#import "PSMTabBarControl.h"
@@ -27,12 +28,6 @@
return self;
}
-- (void)dealloc {
- [_PSMTabBarOverflowPopUpImage release];
- [_PSMTabBarOverflowDownPopUpImage release];
- [super dealloc];
-}
-
- (void)drawRect:(NSRect)rect {
if(_PSMTabBarOverflowPopUpImage == nil) {
[super drawRect:rect];
@@ -49,7 +44,7 @@
drawPoint.y += imageSize.height;
}
- [image compositeToPoint:drawPoint operation:NSCompositeSourceOver fraction:(_animatingAlternateImage ? 0.7f : 1.0f)];
+ [image drawAtPoint:drawPoint fromRect: CGRectZero operation:NSCompositingOperationSourceOver fraction:(_animatingAlternateImage ? 0.7f : 1.0f)];
if(_animatingAlternateImage) {
NSImage *alternateImage = [self alternateImage];
@@ -60,7 +55,7 @@
drawPoint.y += altImageSize.height;
}
- [[self alternateImage] compositeToPoint:drawPoint operation:NSCompositeSourceOver fraction:sin(_animationValue * M_PI)];
+ [[self alternateImage] drawAtPoint:drawPoint fromRect: CGRectZero operation:NSCompositingOperationSourceOver fraction:sin(_animationValue * M_PI)];
}
}
@@ -111,7 +106,7 @@
}
}
-- (BOOL)animatingAlternateImage;
+- (BOOL)animatingAlternateImage
{
return _animatingAlternateImage;
}
@@ -141,8 +136,9 @@
- (id)initWithCoder:(NSCoder *)aDecoder {
if((self = [super initWithCoder:aDecoder])) {
if([aDecoder allowsKeyedCoding]) {
- _PSMTabBarOverflowPopUpImage = [[aDecoder decodeObjectForKey:@"PSMTabBarOverflowPopUpImage"] retain];
- _PSMTabBarOverflowDownPopUpImage = [[aDecoder decodeObjectForKey:@"PSMTabBarOverflowDownPopUpImage"] retain];
+ _PSMTabBarOverflowPopUpImage =
+ [aDecoder decodeObjectForKey:@"PSMTabBarOverflowPopUpImage"];
+ _PSMTabBarOverflowDownPopUpImage = [aDecoder decodeObjectForKey:@"PSMTabBarOverflowDownPopUpImage"];
[self setAnimatingAlternateImage:[aDecoder decodeBoolForKey:@"PSMTabBarOverflowAnimatingAlternateImage"]];
}
}