| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |