Skip to content
Browse files

Fix -[NSImage compositeToPoint:operation:] deprecation warning on 10.8

Closes #63.
  • Loading branch information...
1 parent f57aaaf commit ac6f844d5943d523c321b5c664a5fa6c8cec61d8 @alloy committed Sep 7, 2012
Showing with 2 additions and 9 deletions.
  1. +2 −9 src/MacVim/ImageAndTextCell.m
View
11 src/MacVim/ImageAndTextCell.m
@@ -121,15 +121,8 @@ - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
NSRectFill(imageFrame);
}
imageFrame.origin.x += 3;
- imageFrame.size = imageSize;
-
- if ([controlView isFlipped]) {
- imageFrame.origin.y += ceil((cellFrame.size.height + imageFrame.size.height) / 2);
- } else {
- imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2);
- }
-
- [image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver];
+ [image setFlipped:[controlView isFlipped]];
+ [image drawAtPoint:imageFrame.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
[super drawWithFrame:cellFrame inView:controlView];
}

0 comments on commit ac6f844

Please sign in to comment.
Something went wrong with that request. Please try again.