| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common_theme.h" | 5 #include "ui/native_theme/common_theme.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "third_party/skia/include/core/SkCanvas.h" | 9 #include "third_party/skia/include/core/SkCanvas.h" |
| 10 #include "ui/base/material_design/material_design_controller.h" | 10 #include "ui/base/material_design/material_design_controller.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 case NativeTheme::kColorId_MenuSeparatorColor: | 176 case NativeTheme::kColorId_MenuSeparatorColor: |
| 177 return kMenuSeparatorColor; | 177 return kMenuSeparatorColor; |
| 178 case NativeTheme::kColorId_MenuBackgroundColor: | 178 case NativeTheme::kColorId_MenuBackgroundColor: |
| 179 return kMenuBackgroundColor; | 179 return kMenuBackgroundColor; |
| 180 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: | 180 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: |
| 181 return kMenuHighlightBackgroundColor; | 181 return kMenuHighlightBackgroundColor; |
| 182 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: | 182 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: |
| 183 return kEnabledMenuItemForegroundColor; | 183 return kEnabledMenuItemForegroundColor; |
| 184 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: | 184 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: |
| 185 return kDisabledMenuItemForegroundColor; | 185 return kDisabledMenuItemForegroundColor; |
| 186 case NativeTheme::kColorId_MenuItemSubtitleColor: |
| 187 return base_theme->GetSystemColor( |
| 188 NativeTheme::kColorId_DisabledMenuItemForegroundColor); |
| 186 | 189 |
| 187 // Label | 190 // Label |
| 188 case NativeTheme::kColorId_LabelEnabledColor: | 191 case NativeTheme::kColorId_LabelEnabledColor: |
| 189 return kButtonEnabledColor; | 192 return kButtonEnabledColor; |
| 190 case NativeTheme::kColorId_LabelDisabledColor: | 193 case NativeTheme::kColorId_LabelDisabledColor: |
| 191 return base_theme->GetSystemColor( | 194 return base_theme->GetSystemColor( |
| 192 NativeTheme::kColorId_ButtonDisabledColor); | 195 NativeTheme::kColorId_ButtonDisabledColor); |
| 193 case NativeTheme::kColorId_LabelTextSelectionColor: | 196 case NativeTheme::kColorId_LabelTextSelectionColor: |
| 194 return kTextSelectionColor; | 197 return kTextSelectionColor; |
| 195 case NativeTheme::kColorId_LabelTextSelectionBackgroundFocused: | 198 case NativeTheme::kColorId_LabelTextSelectionBackgroundFocused: |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 } | 344 } |
| 342 if (menu_item.corner_radius > 0) { | 345 if (menu_item.corner_radius > 0) { |
| 343 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); | 346 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); |
| 344 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); | 347 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); |
| 345 return; | 348 return; |
| 346 } | 349 } |
| 347 canvas->drawRect(gfx::RectToSkRect(rect), paint); | 350 canvas->drawRect(gfx::RectToSkRect(rect), paint); |
| 348 } | 351 } |
| 349 | 352 |
| 350 } // namespace ui | 353 } // namespace ui |
| OLD | NEW |