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

Side by Side Diff: ui/native_theme/native_theme_mac.mm

Issue 2375543003: Add SetProminent() to MdTextButton to create blue buttons. (Closed)
Patch Set: Fix nits. Created 4 years, 2 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 | « ui/native_theme/native_theme_dark_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/native_theme/native_theme_mac.h" 5 #include "ui/native_theme/native_theme_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Buttons and labels. 185 // Buttons and labels.
186 case kColorId_ButtonBackgroundColor: 186 case kColorId_ButtonBackgroundColor:
187 case kColorId_ButtonHoverBackgroundColor: 187 case kColorId_ButtonHoverBackgroundColor:
188 case kColorId_HoverMenuButtonBorderColor: 188 case kColorId_HoverMenuButtonBorderColor:
189 case kColorId_LabelBackgroundColor: 189 case kColorId_LabelBackgroundColor:
190 return NSSystemColorToSkColor([NSColor controlBackgroundColor]); 190 return NSSystemColorToSkColor([NSColor controlBackgroundColor]);
191 case kColorId_ButtonEnabledColor: 191 case kColorId_ButtonEnabledColor:
192 case kColorId_EnabledMenuButtonBorderColor: 192 case kColorId_EnabledMenuButtonBorderColor:
193 case kColorId_LabelEnabledColor: 193 case kColorId_LabelEnabledColor:
194 case kColorId_CallToActionColor: 194 case kColorId_ProminentButtonColor:
195 return NSSystemColorToSkColor([NSColor controlTextColor]); 195 return NSSystemColorToSkColor([NSColor controlTextColor]);
196 case kColorId_ButtonDisabledColor: 196 case kColorId_ButtonDisabledColor:
197 case kColorId_LabelDisabledColor: 197 case kColorId_LabelDisabledColor:
198 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); 198 return NSSystemColorToSkColor([NSColor disabledControlTextColor]);
199 case kColorId_ButtonHighlightColor: 199 case kColorId_ButtonHighlightColor:
200 // Although the NSColor documentation names "selectedControlTextColor" as 200 // Although the NSColor documentation names "selectedControlTextColor" as
201 // the color for a "text in a .. control being clicked or dragged", it 201 // the color for a "text in a .. control being clicked or dragged", it
202 // remains black, and text on Yosemite-style pressed buttons is white. 202 // remains black, and text on Yosemite-style pressed buttons is white.
203 return SK_ColorWHITE; 203 return SK_ColorWHITE;
204 case kColorId_ButtonHoverColor: 204 case kColorId_ButtonHoverColor:
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 canvas->drawDRRect(outer_shape, shape, paint); 436 canvas->drawDRRect(outer_shape, shape, paint);
437 } 437 }
438 438
439 NativeThemeMac::NativeThemeMac() { 439 NativeThemeMac::NativeThemeMac() {
440 } 440 }
441 441
442 NativeThemeMac::~NativeThemeMac() { 442 NativeThemeMac::~NativeThemeMac() {
443 } 443 }
444 444
445 } // namespace ui 445 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_dark_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698