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

Unified Diff: chrome/browser/cocoa/browser_frame_view.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 | « no previous file | chrome/browser/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_frame_view.mm
===================================================================
--- chrome/browser/cocoa/browser_frame_view.mm (revision 30825)
+++ chrome/browser/cocoa/browser_frame_view.mm (working copy)
@@ -12,13 +12,6 @@
#import "chrome/browser/cocoa/chrome_browser_window.h"
#import "third_party/GTM/AppKit/GTMTheme.h"
-// To line up our background pattern with the patterns in the tabs we need
-// to move our background patterns in the window frame up by two pixels.
-// This will make the themes look slightly different than in Windows/Linux
-// because of the differing heights between window top and tab top, but this
-// has been approved by UI.
-static const NSInteger kBrowserFrameViewPatternPhaseOffset = 2;
-
@interface NSView (Swizzles)
- (void)drawRectOriginal:(NSRect)rect;
- (BOOL)_mouseInGroup:(NSButton*)widget;
@@ -118,9 +111,17 @@
NSColor* color = [theme backgroundPatternColorForStyle:GTMThemeStyleWindow
state:state];
if (color) {
- // If we have a theme pattern, draw it here.
- NSPoint phase = NSMakePoint(0, (NSHeight(windowRect) +
- kBrowserFrameViewPatternPhaseOffset));
+ // If there is a theme pattern, draw it here.
+
+ // To line up the background pattern with the patterns in the tabs the
+ // background pattern in the window frame need to be moved up by two
+ // pixels and left by 5.
+ // This will make the themes look slightly different than in Windows/Linux
+ // because of the differing heights between window top and tab top, but this
+ // has been approved by UI.
+ static const NSPoint kBrowserFrameViewPatternPhaseOffset = { -5, 2 };
+ NSPoint phase = kBrowserFrameViewPatternPhaseOffset;
+ phase.y += NSHeight(windowRect);
[[NSGraphicsContext currentContext] setPatternPhase:phase];
[color set];
NSRectFill(rect);
« no previous file with comments | « no previous file | chrome/browser/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698