Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: ui/native_theme/common_theme.cc

Issue 2374253011: Update "primary" text color for Harmony. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/color_palette.h" 13 #include "ui/gfx/color_palette.h"
14 #include "ui/gfx/color_utils.h" 14 #include "ui/gfx/color_utils.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/image/image_skia.h" 16 #include "ui/gfx/image/image_skia.h"
17 #include "ui/gfx/skia_util.h" 17 #include "ui/gfx/skia_util.h"
18 #include "ui/resources/grit/ui_resources.h" 18 #include "ui/resources/grit/ui_resources.h"
19 19
20 namespace ui { 20 namespace ui {
21 21
22 SkColor GetAuraColor(NativeTheme::ColorId color_id, 22 SkColor GetAuraColor(NativeTheme::ColorId color_id,
23 const NativeTheme* base_theme) { 23 const NativeTheme* base_theme) {
24 // Second wave of MD colors (colors that only appear in secondary UI). 24 // Second wave of MD colors (colors that only appear in secondary UI).
25 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { 25 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
26 static const SkColor kPrimaryTextColor = SkColorSetRGB(0x33, 0x33, 0x33); 26 static const SkColor kPrimaryTextColor = SK_ColorBLACK;
27 27
28 switch (color_id) { 28 switch (color_id) {
29 // Labels 29 // Labels
30 case NativeTheme::kColorId_LabelEnabledColor: 30 case NativeTheme::kColorId_LabelEnabledColor:
31 return kPrimaryTextColor; 31 return kPrimaryTextColor;
32 case NativeTheme::kColorId_LabelDisabledColor: 32 case NativeTheme::kColorId_LabelDisabledColor:
33 return SkColorSetA( 33 return SkColorSetA(
34 base_theme->GetSystemColor(NativeTheme::kColorId_LabelEnabledColor), 34 base_theme->GetSystemColor(NativeTheme::kColorId_LabelEnabledColor),
35 gfx::kDisabledControlAlpha); 35 gfx::kDisabledControlAlpha);
36 36
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 478 }
479 if (menu_item.corner_radius > 0) { 479 if (menu_item.corner_radius > 0) {
480 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 480 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
481 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 481 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
482 return; 482 return;
483 } 483 }
484 canvas->drawRect(gfx::RectToSkRect(rect), paint); 484 canvas->drawRect(gfx::RectToSkRect(rect), paint);
485 } 485 }
486 486
487 } // namespace ui 487 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698