diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-27 21:12:54 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-27 21:12:54 +0000 |
commit | b82a45f2c50c7fa8dfb45e512d0caaec7d654c1e (patch) | |
tree | a89ac2f3e887651a89fb078791cad18031048113 /chrome/browser/cocoa | |
parent | 16e97f777a9429b2a0fde3a7982ff393b41e72ee (diff) | |
download | chromium_src-b82a45f2c50c7fa8dfb45e512d0caaec7d654c1e.zip chromium_src-b82a45f2c50c7fa8dfb45e512d0caaec7d654c1e.tar.gz chromium_src-b82a45f2c50c7fa8dfb45e512d0caaec7d654c1e.tar.bz2 |
Fix gradient drawing on the Mac. (Base coordinate system != window base coordinate system.)
BUG=http://crbug.com/17716
TEST=as in bug
Review URL: http://codereview.chromium.org/160194
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/background_gradient_view.mm | 12 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_view.mm | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/cocoa/background_gradient_view.mm b/chrome/browser/cocoa/background_gradient_view.mm index 0be2f56..df3527a 100644 --- a/chrome/browser/cocoa/background_gradient_view.mm +++ b/chrome/browser/cocoa/background_gradient_view.mm @@ -52,10 +52,14 @@ CGFloat winHeight = NSHeight([[self window] frame]); NSGradient *gradient = [theme gradientForStyle:GTMThemeStyleToolBar state:isKey]; - NSPoint startPoint = [self convertPointFromBase: - NSMakePoint(0, winHeight - kToolbarTopOffset)]; - NSPoint endPoint = [self convertPointFromBase: - NSMakePoint(0, winHeight - kToolbarTopOffset - kToolbarMaxHeight)]; + NSPoint startPoint = + [self convertPoint:NSMakePoint(0, winHeight - kToolbarTopOffset) + fromView:nil]; + NSPoint endPoint = + [self convertPoint:NSMakePoint(0, winHeight - + kToolbarTopOffset - + kToolbarMaxHeight) + fromView:nil]; [gradient drawFromPoint:startPoint toPoint:endPoint diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm index 5d09f2c..a8d9fb5 100644 --- a/chrome/browser/cocoa/tab_view.mm +++ b/chrome/browser/cocoa/tab_view.mm @@ -13,9 +13,6 @@ static const CGFloat kInsetMultiplier = 2.0/3.0; static const CGFloat kControlPoint1Multiplier = 1.0/3.0; static const CGFloat kControlPoint2Multiplier = 3.0/8.0; -static const CGFloat kToolbarTopOffset = 12; -static const CGFloat kToolbarMaxHeight = 128; - @implementation TabView @synthesize state = state_; |