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

Unified Diff: chrome/browser/cocoa/background_gradient_view.mm

Issue 160194: Fix gradient drawing on the Mac. (Base coordinate system != window base coord... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/background_gradient_view.mm
===================================================================
--- chrome/browser/cocoa/background_gradient_view.mm (revision 21643)
+++ chrome/browser/cocoa/background_gradient_view.mm (working copy)
@@ -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
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698