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

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

Issue 1931013002: MD-ify textfields and combobox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 | ui/views/controls/focusable_border.cc » ('j') | 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"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 case NativeTheme::kColorId_ResultsTableNegativeText: 94 case NativeTheme::kColorId_ResultsTableNegativeText:
95 case NativeTheme::kColorId_ResultsTableNegativeHoveredText: 95 case NativeTheme::kColorId_ResultsTableNegativeHoveredText:
96 case NativeTheme::kColorId_ResultsTableNegativeSelectedText: 96 case NativeTheme::kColorId_ResultsTableNegativeSelectedText:
97 return kNegativeTextColorMd; 97 return kNegativeTextColorMd;
98 98
99 default: 99 default:
100 break; 100 break;
101 } 101 }
102 } 102 }
103 103
104 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
105 switch (color_id) {
106 // FocusableBorder
107 case NativeTheme::kColorId_FocusedBorderColor:
108 return gfx::kGoogleBlue500;
109 case NativeTheme::kColorId_UnfocusedBorderColor:
110 return SkColorSetA(SK_ColorBLACK, 0x66);
111
112 default:
113 break;
114 }
115 }
116
104 // Pre-MD colors. 117 // Pre-MD colors.
105 // Windows: 118 // Windows:
106 static const SkColor kWindowBackgroundColor = SK_ColorWHITE; 119 static const SkColor kWindowBackgroundColor = SK_ColorWHITE;
107 // Dialogs: 120 // Dialogs:
108 static const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251); 121 static const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);
109 // FocusableBorder: 122 // FocusableBorder:
110 static const SkColor kFocusedBorderColor = SkColorSetRGB(0x4D, 0x90, 0xFE); 123 static const SkColor kFocusedBorderColor = SkColorSetRGB(0x4D, 0x90, 0xFE);
111 static const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9); 124 static const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9);
112 // Button: 125 // Button:
113 static const SkColor kButtonBackgroundColor = SkColorSetRGB(0xDE, 0xDE, 0xDE); 126 static const SkColor kButtonBackgroundColor = SkColorSetRGB(0xDE, 0xDE, 0xDE);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 442 }
430 if (menu_item.corner_radius > 0) { 443 if (menu_item.corner_radius > 0) {
431 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 444 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
432 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 445 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
433 return; 446 return;
434 } 447 }
435 canvas->drawRect(gfx::RectToSkRect(rect), paint); 448 canvas->drawRect(gfx::RectToSkRect(rect), paint);
436 } 449 }
437 450
438 } // namespace ui 451 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/focusable_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698