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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); | 140 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); |
141 case kColorId_SelectedMenuItemForegroundColor: | 141 case kColorId_SelectedMenuItemForegroundColor: |
142 return NSSystemColorToSkColor([NSColor selectedMenuItemTextColor]); | 142 return NSSystemColorToSkColor([NSColor selectedMenuItemTextColor]); |
143 case kColorId_FocusedMenuItemBackgroundColor: | 143 case kColorId_FocusedMenuItemBackgroundColor: |
144 return NSSystemColorToSkColor([NSColor selectedMenuItemColor]); | 144 return NSSystemColorToSkColor([NSColor selectedMenuItemColor]); |
145 case kColorId_MenuBackgroundColor: | 145 case kColorId_MenuBackgroundColor: |
146 return kMenuPopupBackgroundColor; | 146 return kMenuPopupBackgroundColor; |
147 case kColorId_MenuSeparatorColor: | 147 case kColorId_MenuSeparatorColor: |
148 return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks | 148 return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks |
149 : kMenuSeparatorColor; | 149 : kMenuSeparatorColor; |
| 150 case kColorId_MenuItemSubtitleColor: |
| 151 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); |
150 case kColorId_MenuBorderColor: | 152 case kColorId_MenuBorderColor: |
151 return kMenuBorderColor; | 153 return kMenuBorderColor; |
152 | 154 |
153 // Mac has a different "pressed button" styling because it doesn't use | 155 // Mac has a different "pressed button" styling because it doesn't use |
154 // ripples. | 156 // ripples. |
155 case kColorId_ButtonPressedShade: | 157 case kColorId_ButtonPressedShade: |
156 return SkColorSetA(SK_ColorBLACK, 0x10); | 158 return SkColorSetA(SK_ColorBLACK, 0x10); |
157 | 159 |
158 // There's a system setting General > Highlight color which sets the | 160 // There's a system setting General > Highlight color which sets the |
159 // background color for text selections. We honor that setting. | 161 // background color for text selections. We honor that setting. |
(...skipping 274 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 |