aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/PSMTabDragAssistant.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/PSMTabDragAssistant.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/PSMTabDragAssistant.m')
-rw-r--r--Frameworks/PSMTabBar/PSMTabDragAssistant.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabDragAssistant.m b/Frameworks/PSMTabBar/PSMTabDragAssistant.m
index 21e014da..db993b81 100644
--- a/Frameworks/PSMTabBar/PSMTabDragAssistant.m
+++ b/Frameworks/PSMTabBar/PSMTabDragAssistant.m
@@ -668,6 +668,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil;
//get a custom image representation of the view to drag from the delegate
NSImage *tabImage = [_draggedTab image];
NSPoint drawPoint;
+ NSRect drawRect;
_dragWindowOffset = NSZeroSize;
viewImage = [[control delegate] tabView:[control tabView] imageForTabViewItem:[cell representedObject] offset:&_dragWindowOffset styleMask:outMask];
[viewImage lockFocus];
@@ -681,9 +682,10 @@ static PSMTabDragAssistant *sharedDragAssistant = nil;
} else {
drawPoint.x += [control frame].size.width - [tabImage size].width;
}
+ drawRect = NSMakeRect(drawPoint.x, drawPoint.y, [tabImage size].width, [tabImage size].height);
- [tabImage compositeToPoint:drawPoint operation:NSCompositeSourceOver];
-
+ [tabImage drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0f respectFlipped:YES hints:nil];
+
[viewImage unlockFocus];
} else {
//the delegate doesn't give a custom image, so use an image of the view