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

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

Issue 351010: Shifted patterns in tabs and background pattern over so that patterns line up... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/cocoa/browser_frame_view.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller.mm (revision 30825)
+++ chrome/browser/cocoa/browser_window_controller.mm (working copy)
@@ -1038,17 +1038,23 @@
- (NSPoint)gtm_themePatternPhaseForWindow:(NSWindow*)window {
// Our patterns want to be drawn from the upper left hand corner of the view.
// Cocoa wants to do it from the lower left of the window.
+ //
// Rephase our pattern to fit this view. Some other views (Tabs, Toolbar etc.)
// will phase their patterns relative to this so all the views look right.
+ //
+ // To line up the background pattern with the pattern in the browser window
+ // the background pattern for the tabs needs to be moved left by 5 pixels.
+ const CGFloat kPatternHorizontalOffset = -5;
NSView* tabStripView = [self tabStripView];
NSRect tabStripViewWindowBounds = [tabStripView bounds];
NSView* windowChromeView = [[window contentView] superview];
tabStripViewWindowBounds =
[tabStripView convertRect:tabStripViewWindowBounds
toView:windowChromeView];
- NSPoint phase = NSMakePoint(NSMinX(tabStripViewWindowBounds),
+ NSPoint phase = NSMakePoint(NSMinX(tabStripViewWindowBounds)
+ + kPatternHorizontalOffset,
NSMinY(tabStripViewWindowBounds)
- + [TabStripController defaultTabHeight]);
+ + [TabStripController defaultTabHeight]);
return phase;
}
« no previous file with comments | « chrome/browser/cocoa/browser_frame_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698