aboutsummaryrefslogtreecommitdiffstats
path: root/Source/ImageAndTextCell.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 /Source/ImageAndTextCell.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 'Source/ImageAndTextCell.m')
-rw-r--r--Source/ImageAndTextCell.m16
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/ImageAndTextCell.m b/Source/ImageAndTextCell.m
index d90e28b9..b556316d 100644
--- a/Source/ImageAndTextCell.m
+++ b/Source/ImageAndTextCell.m
@@ -143,14 +143,9 @@
imageFrame.size = imageSize;
- if ([view isFlipped])
- imageFrame.origin.y += ceilf((cellFrame.size.height + imageFrame.size.height) / 2);
- else
- imageFrame.origin.y += ceilf((cellFrame.size.height - imageFrame.size.height) / 2);
+ imageFrame.origin.y += ceilf((cellFrame.size.height - imageFrame.size.height) / 2) - 1;
- imageFrame.origin.y -= 1;
-
- [image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver];
+ [image drawInRect:imageFrame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0f respectFlipped:YES hints:nil];
} else
if (_indentationLevel == 0)
cellFrame.size.height = [view frame].size.height+2;
@@ -182,12 +177,9 @@
imageFrame.origin.x += 3;
imageFrame.size = imageSize;
- if ([controlView isFlipped])
- imageFrame.origin.y += ceilf((cellFrame.size.height + imageFrame.size.height) / 2);
- else
- imageFrame.origin.y += ceilf((cellFrame.size.height - imageFrame.size.height) / 2);
+ imageFrame.origin.y += ceilf((cellFrame.size.height - imageFrame.size.height) / 2);
- [image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver];
+ [image drawInRect:imageFrame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0f respectFlipped:YES hints:nil];
}
[super drawWithFrame:cellFrame inView:controlView];