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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 return kTableTextColor; | 254 return kTableTextColor; |
255 case NativeTheme::kColorId_TableSelectedText: | 255 case NativeTheme::kColorId_TableSelectedText: |
256 case NativeTheme::kColorId_TableSelectedTextUnfocused: | 256 case NativeTheme::kColorId_TableSelectedTextUnfocused: |
257 return kTableSelectedTextColor; | 257 return kTableSelectedTextColor; |
258 case NativeTheme::kColorId_TableSelectionBackgroundFocused: | 258 case NativeTheme::kColorId_TableSelectionBackgroundFocused: |
259 case NativeTheme::kColorId_TableSelectionBackgroundUnfocused: | 259 case NativeTheme::kColorId_TableSelectionBackgroundUnfocused: |
260 return kTableSelectionBackgroundColor; | 260 return kTableSelectionBackgroundColor; |
261 case NativeTheme::kColorId_TableGroupingIndicatorColor: | 261 case NativeTheme::kColorId_TableGroupingIndicatorColor: |
262 return kTableGroupingIndicatorColor; | 262 return kTableGroupingIndicatorColor; |
263 | 263 |
264 // Table Header | |
265 case NativeTheme::kColorId_TableHeaderText: | |
266 return kEnabledMenuItemForegroundColor; | |
Evan Stade
2017/01/20 01:46:02
can you write this as base_theme->GetColor(MenuCol
Tom (Use chromium acct)
2017/01/20 19:10:38
Done.
| |
267 case NativeTheme::kColorId_TableHeaderBackground: | |
268 return kMenuBackgroundColor; | |
269 case NativeTheme::kColorId_TableHeaderSeparator: | |
270 return kEnabledMenuButtonBorderColor; | |
271 | |
264 // FocusableBorder | 272 // FocusableBorder |
265 case NativeTheme::kColorId_FocusedBorderColor: | 273 case NativeTheme::kColorId_FocusedBorderColor: |
266 return gfx::kGoogleBlue500; | 274 return gfx::kGoogleBlue500; |
267 case NativeTheme::kColorId_UnfocusedBorderColor: | 275 case NativeTheme::kColorId_UnfocusedBorderColor: |
268 return SkColorSetA(SK_ColorBLACK, 0x66); | 276 return SkColorSetA(SK_ColorBLACK, 0x66); |
269 | 277 |
270 // Results Tables | 278 // Results Tables |
271 case NativeTheme::kColorId_ResultsTableNormalBackground: | 279 case NativeTheme::kColorId_ResultsTableNormalBackground: |
272 return kTextfieldDefaultBackground; | 280 return kTextfieldDefaultBackground; |
273 case NativeTheme::kColorId_ResultsTableHoveredBackground: | 281 case NativeTheme::kColorId_ResultsTableHoveredBackground: |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 } | 358 } |
351 if (menu_item.corner_radius > 0) { | 359 if (menu_item.corner_radius > 0) { |
352 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); | 360 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); |
353 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); | 361 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); |
354 return; | 362 return; |
355 } | 363 } |
356 canvas->drawRect(gfx::RectToSkRect(rect), paint); | 364 canvas->drawRect(gfx::RectToSkRect(rect), paint); |
357 } | 365 } |
358 | 366 |
359 } // namespace ui | 367 } // namespace ui |
OLD | NEW |