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

Side by Side Diff: chrome/browser/cocoa/tab_strip_view.mm

Issue 3152014: Merge 55906 - [Mac] Fix aesthetic issues with themes given the new TopChrome ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/styled_text_field_cell.mm ('k') | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/cocoa/tab_strip_view.h" 5 #import "chrome/browser/cocoa/tab_strip_view.h"
6 6
7 #include "base/mac_util.h" 7 #include "base/mac_util.h"
8 #include "chrome/browser/browser_theme_provider.h"
8 #import "chrome/browser/cocoa/browser_window_controller.h" 9 #import "chrome/browser/cocoa/browser_window_controller.h"
9 #import "chrome/browser/cocoa/tab_strip_controller.h" 10 #import "chrome/browser/cocoa/tab_strip_controller.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 12
12 @implementation TabStripView 13 @implementation TabStripView
13 14
14 @synthesize newTabButton = newTabButton_; 15 @synthesize newTabButton = newTabButton_;
15 @synthesize dropArrowShown = dropArrowShown_; 16 @synthesize dropArrowShown = dropArrowShown_;
16 @synthesize dropArrowPosition = dropArrowPosition_; 17 @synthesize dropArrowPosition = dropArrowPosition_;
17 18
(...skipping 15 matching lines...) Expand all
33 // tab. 34 // tab.
34 - (void)drawBorder:(NSRect)bounds { 35 - (void)drawBorder:(NSRect)bounds {
35 NSRect borderRect, contentRect; 36 NSRect borderRect, contentRect;
36 37
37 borderRect = bounds; 38 borderRect = bounds;
38 borderRect.origin.y = 1; 39 borderRect.origin.y = 1;
39 borderRect.size.height = 1; 40 borderRect.size.height = 1;
40 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set]; 41 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
41 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver); 42 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
42 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMinYEdge); 43 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMinYEdge);
43 [[NSColor colorWithCalibratedWhite:0.96 alpha:1.0] set]; 44
45 BrowserThemeProvider* themeProvider =
46 static_cast<BrowserThemeProvider*>([[self window] themeProvider]);
47 if (!themeProvider)
48 return;
49
50 NSColor* bezelColor = themeProvider->GetNSColor(
51 themeProvider->UsingDefaultTheme() ?
52 BrowserThemeProvider::COLOR_TOOLBAR_BEZEL :
53 BrowserThemeProvider::COLOR_TOOLBAR, true);
54 [bezelColor set];
55 NSRectFill(borderRect);
44 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver); 56 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
45 } 57 }
46 58
47 - (void)drawRect:(NSRect)rect { 59 - (void)drawRect:(NSRect)rect {
48 NSRect boundsRect = [self bounds]; 60 NSRect boundsRect = [self bounds];
49 61
50 [self drawBorder:boundsRect]; 62 [self drawBorder:boundsRect];
51 63
52 // Draw drop-indicator arrow (if appropriate). 64 // Draw drop-indicator arrow (if appropriate).
53 // TODO(viettrungluu): this is all a stop-gap measure. 65 // TODO(viettrungluu): this is all a stop-gap measure.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 197 }
186 198
187 - (id)accessibilityAttributeValue:(NSString*)attribute { 199 - (id)accessibilityAttributeValue:(NSString*)attribute {
188 if ([attribute isEqual:NSAccessibilityRoleAttribute]) 200 if ([attribute isEqual:NSAccessibilityRoleAttribute])
189 return NSAccessibilityGroupRole; 201 return NSAccessibilityGroupRole;
190 202
191 return [super accessibilityAttributeValue:attribute]; 203 return [super accessibilityAttributeValue:attribute];
192 } 204 }
193 205
194 @end 206 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/styled_text_field_cell.mm ('k') | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698