| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 return kMenuPopupBackgroundColor; | 143 return kMenuPopupBackgroundColor; |
| 144 case kColorId_MenuSeparatorColor: | 144 case kColorId_MenuSeparatorColor: |
| 145 return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks | 145 return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks |
| 146 : kMenuSeparatorColor; | 146 : kMenuSeparatorColor; |
| 147 case kColorId_MenuBorderColor: | 147 case kColorId_MenuBorderColor: |
| 148 return kMenuBorderColor; | 148 return kMenuBorderColor; |
| 149 | 149 |
| 150 // Mac has a different "pressed button" styling because it doesn't use | 150 // Mac has a different "pressed button" styling because it doesn't use |
| 151 // ripples. | 151 // ripples. |
| 152 case kColorId_ButtonPressedShade: | 152 case kColorId_ButtonPressedShade: |
| 153 return SkColorSetA(SK_ColorBLACK, 0x08); | 153 return SkColorSetA(SK_ColorBLACK, 0x10); |
| 154 | 154 |
| 155 // There's a system setting General > Highlight color which sets the | 155 // There's a system setting General > Highlight color which sets the |
| 156 // background color for text selections. We honor that setting. | 156 // background color for text selections. We honor that setting. |
| 157 // TODO(ellyjones): Listen for NSSystemColorsDidChangeNotification somewhere | 157 // TODO(ellyjones): Listen for NSSystemColorsDidChangeNotification somewhere |
| 158 // and propagate it to the View hierarchy. | 158 // and propagate it to the View hierarchy. |
| 159 case kColorId_TextfieldSelectionBackgroundFocused: | 159 case kColorId_TextfieldSelectionBackgroundFocused: |
| 160 return NSSystemColorToSkColor([NSColor selectedTextBackgroundColor]); | 160 return NSSystemColorToSkColor([NSColor selectedTextBackgroundColor]); |
| 161 default: | 161 default: |
| 162 break; | 162 break; |
| 163 } | 163 } |
| (...skipping 272 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 |