aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2014-02-10 01:38:10 +0000
committerrowanbeentje <rowan@beent.je>2014-02-10 01:38:10 +0000
commit5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b (patch)
tree77acc8717172974934b8127a1121bf38fd7159e5 /Frameworks/PSMTabBar/PSMOverflowPopUpButton.m
parent38ca716543d7601a4e29823fb4578b96c599cf81 (diff)
downloadsequelpro-5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b.tar.gz
sequelpro-5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b.tar.bz2
sequelpro-5c8a9b1a15ffd1ecf96340d3f43a4ca916665b9b.zip
Fix run-time warnings due to use of deprecated [NSImage compositeToPoint:...] operations
Diffstat (limited to 'Frameworks/PSMTabBar/PSMOverflowPopUpButton.m')
-rw-r--r--Frameworks/PSMTabBar/PSMOverflowPopUpButton.m14
1 files changed, 4 insertions, 10 deletions
diff --git a/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m b/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m
index 8ce50464..dd3f09d9 100644
--- a/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m
+++ b/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m
@@ -47,23 +47,17 @@
NSRect bounds = [self bounds];
NSPoint drawPoint = NSMakePoint(NSMidX(bounds) - (imageSize.width * 0.5f), NSMidY(bounds) - (imageSize.height * 0.5f));
+ NSRect drawRect = NSMakeRect(drawPoint.x, drawPoint.y, imageSize.width, imageSize.height);
- if ([self isFlipped]) {
- drawPoint.y += imageSize.height;
- }
-
- [image compositeToPoint:drawPoint operation:NSCompositeSourceOver fraction:(_animatingAlternateImage ? 0.7f : 1.0f)];
+ [image drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:(_animatingAlternateImage ? 0.7f : 1.0f) respectFlipped:YES hints:nil];
if (_animatingAlternateImage) {
NSImage *alternateImage = [self alternateImage];
NSSize altImageSize = [alternateImage size];
drawPoint = NSMakePoint(NSMidX(bounds) - (altImageSize.width * 0.5f), NSMidY(bounds) - (altImageSize.height * 0.5f));
+ drawRect = NSMakeRect(drawPoint.x, drawPoint.y, altImageSize.width, altImageSize.height);
- if ([self isFlipped]) {
- drawPoint.y += altImageSize.height;
- }
-
- [[self alternateImage] compositeToPoint:drawPoint operation:NSCompositeSourceOver fraction:sinf(_animationValue * (float)M_PI)];
+ [[self alternateImage] drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:sinf(_animationValue * (float)M_PI) respectFlipped:YES hints:nil];
}
}