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

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

Issue 2961223002: Rename native theme color constants relating to text on dialog buttons
Patch Set: rebase Created 3 years, 5 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return kDialogBackgroundColor; 172 return kDialogBackgroundColor;
173 case kColorId_BubbleBackground: 173 case kColorId_BubbleBackground:
174 return SK_ColorWHITE; 174 return SK_ColorWHITE;
175 175
176 case kColorId_FocusedBorderColor: 176 case kColorId_FocusedBorderColor:
177 return NSSystemColorToSkColor([NSColor keyboardFocusIndicatorColor]); 177 return NSSystemColorToSkColor([NSColor keyboardFocusIndicatorColor]);
178 case kColorId_UnfocusedBorderColor: 178 case kColorId_UnfocusedBorderColor:
179 return NSSystemColorToSkColor([NSColor controlColor]); 179 return NSSystemColorToSkColor([NSColor controlColor]);
180 180
181 // Buttons and labels. 181 // Buttons and labels.
182 case kColorId_ButtonEnabledColor: 182 case kColorId_TextOnEnabledDialogButton:
183 case kColorId_LabelEnabledColor: 183 case kColorId_LabelEnabledColor:
184 return NSSystemColorToSkColor([NSColor controlTextColor]); 184 return NSSystemColorToSkColor([NSColor controlTextColor]);
185 // NSColor doesn't offer a color for prominent buttons. Use the Aura color, 185 // NSColor doesn't offer a color for prominent buttons. Use the Aura color,
186 // but apply the system tint. This is a good match for the blue Cocoa uses 186 // but apply the system tint. This is a good match for the blue Cocoa uses
187 // to draw buttons that are given a \n key equivalent. 187 // to draw buttons that are given a \n key equivalent.
188 case kColorId_ProminentButtonColor: 188 case kColorId_ProminentButtonColor:
189 return ApplySystemControlTint(GetAuraColor(color_id, this)); 189 return ApplySystemControlTint(GetAuraColor(color_id, this));
190 case kColorId_ButtonDisabledColor: 190 case kColorId_TextOnDisabledDialogButton:
191 case kColorId_LabelDisabledColor: 191 case kColorId_LabelDisabledColor:
192 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); 192 return NSSystemColorToSkColor([NSColor disabledControlTextColor]);
193 case kColorId_ButtonHoverColor: 193 case kColorId_ButtonHoverColor:
194 return NSSystemColorToSkColor([NSColor selectedControlTextColor]); 194 return NSSystemColorToSkColor([NSColor selectedControlTextColor]);
195 case kColorId_LabelTextSelectionColor: 195 case kColorId_LabelTextSelectionColor:
196 return NSSystemColorToSkColor([NSColor selectedTextColor]); 196 return NSSystemColorToSkColor([NSColor selectedTextColor]);
197 197
198 // Link. 198 // Link.
199 case kColorId_LinkDisabled: 199 case kColorId_LinkDisabled:
200 return SK_ColorBLACK; 200 return SK_ColorBLACK;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 } 284 }
285 285
286 NativeThemeMac::NativeThemeMac() { 286 NativeThemeMac::NativeThemeMac() {
287 } 287 }
288 288
289 NativeThemeMac::~NativeThemeMac() { 289 NativeThemeMac::~NativeThemeMac() {
290 } 290 }
291 291
292 } // namespace ui 292 } // 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