| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 kTextSelectionBackgroundFocused, 0xDD); | 116 kTextSelectionBackgroundFocused, 0xDD); |
| 117 // Tooltip: | 117 // Tooltip: |
| 118 static const SkColor kTooltipBackground = SkColorSetA(SK_ColorBLACK, 0xCC); | 118 static const SkColor kTooltipBackground = SkColorSetA(SK_ColorBLACK, 0xCC); |
| 119 static const SkColor kTooltipTextColor = SkColorSetA(SK_ColorWHITE, 0xDE); | 119 static const SkColor kTooltipTextColor = SkColorSetA(SK_ColorWHITE, 0xDE); |
| 120 // Tree: | 120 // Tree: |
| 121 static const SkColor kTreeBackground = SK_ColorWHITE; | 121 static const SkColor kTreeBackground = SK_ColorWHITE; |
| 122 static const SkColor kTreeTextColor = SK_ColorBLACK; | 122 static const SkColor kTreeTextColor = SK_ColorBLACK; |
| 123 static const SkColor kTreeSelectedTextColor = SK_ColorBLACK; | 123 static const SkColor kTreeSelectedTextColor = SK_ColorBLACK; |
| 124 static const SkColor kTreeSelectionBackgroundColor = | 124 static const SkColor kTreeSelectionBackgroundColor = |
| 125 SkColorSetRGB(0xEE, 0xEE, 0xEE); | 125 SkColorSetRGB(0xEE, 0xEE, 0xEE); |
| 126 static const SkColor kTreeArrowColor = SkColorSetRGB(0x7A, 0x7A, 0x7A); | |
| 127 // Table: | 126 // Table: |
| 128 static const SkColor kTableBackground = SK_ColorWHITE; | 127 static const SkColor kTableBackground = SK_ColorWHITE; |
| 129 static const SkColor kTableTextColor = SK_ColorBLACK; | 128 static const SkColor kTableTextColor = SK_ColorBLACK; |
| 130 static const SkColor kTableSelectedTextColor = SK_ColorBLACK; | 129 static const SkColor kTableSelectedTextColor = SK_ColorBLACK; |
| 131 static const SkColor kTableSelectionBackgroundColor = | 130 static const SkColor kTableSelectionBackgroundColor = |
| 132 SkColorSetRGB(0xEE, 0xEE, 0xEE); | 131 SkColorSetRGB(0xEE, 0xEE, 0xEE); |
| 133 static const SkColor kTableGroupingIndicatorColor = | 132 static const SkColor kTableGroupingIndicatorColor = |
| 134 SkColorSetRGB(0xCC, 0xCC, 0xCC); | 133 SkColorSetRGB(0xCC, 0xCC, 0xCC); |
| 135 // Material spinner/throbber: | 134 // Material spinner/throbber: |
| 136 static const SkColor kThrobberSpinningColor = gfx::kGoogleBlue500; | 135 static const SkColor kThrobberSpinningColor = gfx::kGoogleBlue500; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 case NativeTheme::kColorId_TreeBackground: | 236 case NativeTheme::kColorId_TreeBackground: |
| 238 return kTreeBackground; | 237 return kTreeBackground; |
| 239 case NativeTheme::kColorId_TreeText: | 238 case NativeTheme::kColorId_TreeText: |
| 240 return kTreeTextColor; | 239 return kTreeTextColor; |
| 241 case NativeTheme::kColorId_TreeSelectedText: | 240 case NativeTheme::kColorId_TreeSelectedText: |
| 242 case NativeTheme::kColorId_TreeSelectedTextUnfocused: | 241 case NativeTheme::kColorId_TreeSelectedTextUnfocused: |
| 243 return kTreeSelectedTextColor; | 242 return kTreeSelectedTextColor; |
| 244 case NativeTheme::kColorId_TreeSelectionBackgroundFocused: | 243 case NativeTheme::kColorId_TreeSelectionBackgroundFocused: |
| 245 case NativeTheme::kColorId_TreeSelectionBackgroundUnfocused: | 244 case NativeTheme::kColorId_TreeSelectionBackgroundUnfocused: |
| 246 return kTreeSelectionBackgroundColor; | 245 return kTreeSelectionBackgroundColor; |
| 247 case NativeTheme::kColorId_TreeArrow: | |
| 248 return kTreeArrowColor; | |
| 249 | 246 |
| 250 // Table | 247 // Table |
| 251 case NativeTheme::kColorId_TableBackground: | 248 case NativeTheme::kColorId_TableBackground: |
| 252 return kTableBackground; | 249 return kTableBackground; |
| 253 case NativeTheme::kColorId_TableText: | 250 case NativeTheme::kColorId_TableText: |
| 254 return kTableTextColor; | 251 return kTableTextColor; |
| 255 case NativeTheme::kColorId_TableSelectedText: | 252 case NativeTheme::kColorId_TableSelectedText: |
| 256 case NativeTheme::kColorId_TableSelectedTextUnfocused: | 253 case NativeTheme::kColorId_TableSelectedTextUnfocused: |
| 257 return kTableSelectedTextColor; | 254 return kTableSelectedTextColor; |
| 258 case NativeTheme::kColorId_TableSelectionBackgroundFocused: | 255 case NativeTheme::kColorId_TableSelectionBackgroundFocused: |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } | 358 } |
| 362 if (menu_item.corner_radius > 0) { | 359 if (menu_item.corner_radius > 0) { |
| 363 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); | 360 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); |
| 364 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, flags); | 361 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, flags); |
| 365 return; | 362 return; |
| 366 } | 363 } |
| 367 canvas->drawRect(gfx::RectToSkRect(rect), flags); | 364 canvas->drawRect(gfx::RectToSkRect(rect), flags); |
| 368 } | 365 } |
| 369 | 366 |
| 370 } // namespace ui | 367 } // namespace ui |
| OLD | NEW |