| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Text fields. | 213 // Text fields. |
| 214 case kColorId_TextfieldDefaultColor: | 214 case kColorId_TextfieldDefaultColor: |
| 215 case kColorId_TextfieldReadOnlyColor: | 215 case kColorId_TextfieldReadOnlyColor: |
| 216 return NSSystemColorToSkColor([NSColor textColor]); | 216 return NSSystemColorToSkColor([NSColor textColor]); |
| 217 case kColorId_TextfieldDefaultBackground: | 217 case kColorId_TextfieldDefaultBackground: |
| 218 case kColorId_TextfieldReadOnlyBackground: | 218 case kColorId_TextfieldReadOnlyBackground: |
| 219 return NSSystemColorToSkColor([NSColor textBackgroundColor]); | 219 return NSSystemColorToSkColor([NSColor textBackgroundColor]); |
| 220 case kColorId_TextfieldSelectionColor: | 220 case kColorId_TextfieldSelectionColor: |
| 221 return NSSystemColorToSkColor([NSColor selectedTextColor]); | 221 return NSSystemColorToSkColor([NSColor selectedTextColor]); |
| 222 case kColorId_TextfieldSelectionBackgroundUnfocused: |
| 223 return kUnfocusedSelectedTextBackgroundColor; |
| 222 | 224 |
| 223 // Trees/Tables. For focused text, use the alternate* versions, which | 225 // Trees/Tables. For focused text, use the alternate* versions, which |
| 224 // NSColor documents as "the table and list view equivalent to the | 226 // NSColor documents as "the table and list view equivalent to the |
| 225 // selectedControlTextColor". | 227 // selectedControlTextColor". |
| 226 case kColorId_TreeBackground: | 228 case kColorId_TreeBackground: |
| 227 case kColorId_TableBackground: | 229 case kColorId_TableBackground: |
| 228 return NSSystemColorToSkColor([NSColor controlBackgroundColor]); | 230 return NSSystemColorToSkColor([NSColor controlBackgroundColor]); |
| 229 case kColorId_TreeText: | 231 case kColorId_TreeText: |
| 230 case kColorId_TableText: | 232 case kColorId_TableText: |
| 231 case kColorId_TableSelectedTextUnfocused: | 233 case kColorId_TableSelectedTextUnfocused: |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 canvas->drawDRRect(outer_shape, shape, paint); | 436 canvas->drawDRRect(outer_shape, shape, paint); |
| 435 } | 437 } |
| 436 | 438 |
| 437 NativeThemeMac::NativeThemeMac() { | 439 NativeThemeMac::NativeThemeMac() { |
| 438 } | 440 } |
| 439 | 441 |
| 440 NativeThemeMac::~NativeThemeMac() { | 442 NativeThemeMac::~NativeThemeMac() { |
| 441 } | 443 } |
| 442 | 444 |
| 443 } // namespace ui | 445 } // namespace ui |
| OLD | NEW |