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

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

Issue 3140009: [Mac] Fix aesthetic issues with themes given the new TopChrome changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/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 #import "chrome/browser/cocoa/view_id_util.h" 11 #import "chrome/browser/cocoa/view_id_util.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 13
13 @implementation TabStripView 14 @implementation TabStripView
14 15
15 @synthesize newTabButton = newTabButton_; 16 @synthesize newTabButton = newTabButton_;
16 @synthesize dropArrowShown = dropArrowShown_; 17 @synthesize dropArrowShown = dropArrowShown_;
17 @synthesize dropArrowPosition = dropArrowPosition_; 18 @synthesize dropArrowPosition = dropArrowPosition_;
(...skipping 16 matching lines...) Expand all
34 // tab. 35 // tab.
35 - (void)drawBorder:(NSRect)bounds { 36 - (void)drawBorder:(NSRect)bounds {
36 NSRect borderRect, contentRect; 37 NSRect borderRect, contentRect;
37 38
38 borderRect = bounds; 39 borderRect = bounds;
39 borderRect.origin.y = 1; 40 borderRect.origin.y = 1;
40 borderRect.size.height = 1; 41 borderRect.size.height = 1;
41 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set]; 42 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
42 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver); 43 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
43 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMinYEdge); 44 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMinYEdge);
44 [[NSColor colorWithCalibratedWhite:0.96 alpha:1.0] set]; 45
46 BrowserThemeProvider* themeProvider =
47 static_cast<BrowserThemeProvider*>([[self window] themeProvider]);
48 if (!themeProvider)
49 return;
50
51 NSColor* bezelColor = themeProvider->GetNSColor(
52 themeProvider->UsingDefaultTheme() ?
53 BrowserThemeProvider::COLOR_TOOLBAR_BEZEL :
54 BrowserThemeProvider::COLOR_TOOLBAR, true);
55 [bezelColor set];
56 NSRectFill(borderRect);
45 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver); 57 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
46 } 58 }
47 59
48 - (void)drawRect:(NSRect)rect { 60 - (void)drawRect:(NSRect)rect {
49 NSRect boundsRect = [self bounds]; 61 NSRect boundsRect = [self bounds];
50 62
51 [self drawBorder:boundsRect]; 63 [self drawBorder:boundsRect];
52 64
53 // Draw drop-indicator arrow (if appropriate). 65 // Draw drop-indicator arrow (if appropriate).
54 // TODO(viettrungluu): this is all a stop-gap measure. 66 // TODO(viettrungluu): this is all a stop-gap measure.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return NSAccessibilityGroupRole; 202 return NSAccessibilityGroupRole;
191 203
192 return [super accessibilityAttributeValue:attribute]; 204 return [super accessibilityAttributeValue:attribute];
193 } 205 }
194 206
195 - (ViewID)viewID { 207 - (ViewID)viewID {
196 return VIEW_ID_TAB_STRIP; 208 return VIEW_ID_TAB_STRIP;
197 } 209 }
198 210
199 @end 211 @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