Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/apple_sample_code/ImageAndTextCell.m

Issue 10793033: Fix cookie sheet icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/apple_sample_code/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/apple_sample_code/ImageAndTextCell.m
diff --git a/third_party/apple_sample_code/ImageAndTextCell.m b/third_party/apple_sample_code/ImageAndTextCell.m
index e7e66640f8b60d86579189176c0777bcef1dca06..349cd454e6ff3fefd7740725291300dba3b05a0c 100644
--- a/third_party/apple_sample_code/ImageAndTextCell.m
+++ b/third_party/apple_sample_code/ImageAndTextCell.m
@@ -122,15 +122,15 @@
NSRectFill(imageFrame);
}
imageFrame.origin.x += 3;
+ imageFrame.origin.y += ceil((cellFrame.size.height - imageSize.height) / 2);
Robert Sesek 2012/07/17 21:41:34 Technically this should be std::ceil, but that'd r
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 drawInRect:imageFrame
+ fromRect:NSZeroRect
+ operation:NSCompositeSourceOver
+ fraction:1.0
+ respectFlipped:YES
+ hints:nil];
}
[super drawWithFrame:cellFrame inView:controlView];
}
« no previous file with comments | « no previous file | third_party/apple_sample_code/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698