diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 18:21:12 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 18:21:12 +0000 |
commit | d60655b86f1d6a15e88ca51a77ccb7d3a3945612 (patch) | |
tree | ef45576279e8b904b3ffb50a25df5401d9098ec4 /chrome/browser/cocoa/bookmark_button_cell.mm | |
parent | e9b084c2af3b8831f1d872691184da32e7df5b92 (diff) | |
download | chromium_src-d60655b86f1d6a15e88ca51a77ccb7d3a3945612.zip chromium_src-d60655b86f1d6a15e88ca51a77ccb7d3a3945612.tar.gz chromium_src-d60655b86f1d6a15e88ca51a77ccb7d3a3945612.tar.bz2 |
[Mac] Image-drawing which doesn't require image-flipping.
Snow Leopard deprecated -[NSImage setFlipped:] for good reasons. This
implements a method similar to the new
-[NSImage drawInRect:*:respectFlipped:] method, which allows images to
be drawn so that they always look right visually regardless of the
-isFlipped status of the view being drawn.
BUG=38943
TEST=Autocomplete, download, and reload button look right.
Review URL: http://codereview.chromium.org/2587003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_button_cell.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_button_cell.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/bookmark_button_cell.mm b/chrome/browser/cocoa/bookmark_button_cell.mm index d2a30b9..f8d0ffc 100644 --- a/chrome/browser/cocoa/bookmark_button_cell.mm +++ b/chrome/browser/cocoa/bookmark_button_cell.mm @@ -11,6 +11,7 @@ #import "chrome/browser/bookmarks/bookmark_model.h" #import "chrome/browser/cocoa/bookmark_menu.h" #import "chrome/browser/cocoa/bookmark_button.h" +#import "chrome/browser/cocoa/image_utils.h" #include "grit/generated_resources.h" @@ -225,11 +226,11 @@ NSWidth(cellFrame) - NSWidth(imageRect), (NSHeight(cellFrame) / 2.0) - (NSHeight(imageRect) / 2.0)); - [arrowImage_ setFlipped:[controlView isFlipped]]; [arrowImage_ drawInRect:drawRect fromRect:imageRect operation:NSCompositeSourceOver - fraction:[self isEnabled] ? 1.0 : 0.5]; + fraction:[self isEnabled] ? 1.0 : 0.5 + neverFlipped:YES]; } } |