diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 23:27:28 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 23:27:28 +0000 |
commit | 22ad694f1d8bc6049dc91027dcb93af2216075ff (patch) | |
tree | ea69af15ae9fb0eb4b82eeae6d88c94e194413dc /third_party/apple_sample_code | |
parent | 15b9ade97761f5f81cc4e97268061c72de37d888 (diff) | |
download | chromium_src-22ad694f1d8bc6049dc91027dcb93af2216075ff.zip chromium_src-22ad694f1d8bc6049dc91027dcb93af2216075ff.tar.gz chromium_src-22ad694f1d8bc6049dc91027dcb93af2216075ff.tar.bz2 |
Fix cookie sheet icons.
BUG=137201
TEST=as in bug
Review URL: https://chromiumcodereview.appspot.com/10793033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/apple_sample_code')
-rw-r--r-- | third_party/apple_sample_code/ImageAndTextCell.m | 14 | ||||
-rw-r--r-- | third_party/apple_sample_code/README.chromium | 6 |
2 files changed, 13 insertions, 7 deletions
diff --git a/third_party/apple_sample_code/ImageAndTextCell.m b/third_party/apple_sample_code/ImageAndTextCell.m index e7e6664..349cd45 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); 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]; } diff --git a/third_party/apple_sample_code/README.chromium b/third_party/apple_sample_code/README.chromium index a1adc03..09d2982 100644 --- a/third_party/apple_sample_code/README.chromium +++ b/third_party/apple_sample_code/README.chromium @@ -1,7 +1,13 @@ Name: Apple sample code URL: http://developer.apple.com/ +Version: unknown +Security Critical: Yes Local changes: * ImageAndTextCell.h: Changed 'image' property to 'retain' mode to fix a crash. * ImageAndTextCell.m: Moved '@synthesize' to to the top of '@implementation' as suggested by a clang warning. +* ImageAndTextCell.m: Switched from -[NSImage compositeToPoint:operation:] to + -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + as the former is deprecated and doesn't work properly in + HiDPI. |