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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm

Issue 2241943002: [Material][Mac] Fixed EV chip's dark theme colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 #include <cmath> 5 #include <cmath>
6 6
7 #import "chrome/browser/ui/cocoa/location_bar/bubble_decoration.h" 7 #import "chrome/browser/ui/cocoa/location_bar/bubble_decoration.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Draw the divider and set the text color. 113 // Draw the divider and set the text color.
114 if (ui::MaterialDesignController::IsModeMaterial()) { 114 if (ui::MaterialDesignController::IsModeMaterial()) {
115 NSBezierPath* line = [NSBezierPath bezierPath]; 115 NSBezierPath* line = [NSBezierPath bezierPath];
116 [line setLineWidth:1]; 116 [line setLineWidth:1];
117 [line moveToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(), 117 [line moveToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
118 NSMinY(decoration_frame))]; 118 NSMinY(decoration_frame))];
119 [line lineToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(), 119 [line lineToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
120 NSMaxY(decoration_frame))]; 120 NSMaxY(decoration_frame))];
121 121
122 bool in_dark_mode = [[control_view window] inIncognitoModeWithSystemTheme]; 122 bool in_dark_mode = [[control_view window] hasDarkTheme];
123 [GetDividerColor(in_dark_mode) set]; 123 [GetDividerColor(in_dark_mode) set];
124 [line stroke]; 124 [line stroke];
125 125
126 NSColor* text_color = 126 NSColor* text_color =
127 in_dark_mode 127 in_dark_mode
128 ? skia::SkColorToSRGBNSColor(kMaterialDarkModeTextColor) 128 ? skia::SkColorToSRGBNSColor(kMaterialDarkModeTextColor)
129 : GetBackgroundBorderColor(); 129 : GetBackgroundBorderColor();
130 SetTextColor(text_color); 130 SetTextColor(text_color);
131 } 131 }
132 132
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 [attributes_ setObject:text_color forKey:NSForegroundColorAttributeName]; 184 [attributes_ setObject:text_color forKey:NSForegroundColorAttributeName];
185 } 185 }
186 186
187 void BubbleDecoration::SetFont(NSFont* font) { 187 void BubbleDecoration::SetFont(NSFont* font) {
188 [attributes_ setObject:font forKey:NSFontAttributeName]; 188 [attributes_ setObject:font forKey:NSFontAttributeName];
189 } 189 }
190 190
191 void BubbleDecoration::SetRetinaBaselineOffset(CGFloat offset) { 191 void BubbleDecoration::SetRetinaBaselineOffset(CGFloat offset) {
192 retina_baseline_offset_ = offset; 192 retina_baseline_offset_ = offset;
193 } 193 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698