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

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

Issue 2164783002: [md] Updates aura tooltip colors and padding to MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [md] Updates aura tooltip colors and padding to MD (disable subpixel anti-aliasing for transparent … Created 4 years, 5 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/corewm/DEPS » ('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 19 matching lines...) Expand all
30 // MenuItem: 30 // MenuItem:
31 static const SkColor kMenuHighlightBackgroundColorMd = 31 static const SkColor kMenuHighlightBackgroundColorMd =
32 SkColorSetARGB(0x14, 0x00, 0x00, 0x00); 32 SkColorSetARGB(0x14, 0x00, 0x00, 0x00);
33 static const SkColor kSelectedMenuItemForegroundColorMd = SK_ColorBLACK; 33 static const SkColor kSelectedMenuItemForegroundColorMd = SK_ColorBLACK;
34 // Link: 34 // Link:
35 static const SkColor kLinkEnabledColorMd = gfx::kGoogleBlue700; 35 static const SkColor kLinkEnabledColorMd = gfx::kGoogleBlue700;
36 // Results tables: 36 // Results tables:
37 static const SkColor kResultsTableTextMd = SK_ColorBLACK; 37 static const SkColor kResultsTableTextMd = SK_ColorBLACK;
38 static const SkColor kResultsTableDimmedTextMd = 38 static const SkColor kResultsTableDimmedTextMd =
39 SkColorSetRGB(0x64, 0x64, 0x64); 39 SkColorSetRGB(0x64, 0x64, 0x64);
40 // Tooltip
41 static const SkColor kTooltipBackgroundMd =
42 SkColorSetA(SK_ColorBLACK, 0xCC);
43 static const SkColor kTooltipTextColorMd = SkColorSetA(SK_ColorWHITE, 0xDE);
40 44
41 switch (color_id) { 45 switch (color_id) {
42 // Dialogs 46 // Dialogs
43 case NativeTheme::kColorId_DialogBackground: 47 case NativeTheme::kColorId_DialogBackground:
44 case NativeTheme::kColorId_BubbleBackground: 48 case NativeTheme::kColorId_BubbleBackground:
45 return kDialogBackgroundColorMd; 49 return kDialogBackgroundColorMd;
46 50
47 // Buttons 51 // Buttons
48 case NativeTheme::kColorId_ButtonEnabledColor: 52 case NativeTheme::kColorId_ButtonEnabledColor:
49 case NativeTheme::kColorId_ButtonHoverColor: 53 case NativeTheme::kColorId_ButtonHoverColor:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return kResultsTableTextMd; 85 return kResultsTableTextMd;
82 case NativeTheme::kColorId_ResultsTableNormalDimmedText: 86 case NativeTheme::kColorId_ResultsTableNormalDimmedText:
83 case NativeTheme::kColorId_ResultsTableHoveredDimmedText: 87 case NativeTheme::kColorId_ResultsTableHoveredDimmedText:
84 case NativeTheme::kColorId_ResultsTableSelectedDimmedText: 88 case NativeTheme::kColorId_ResultsTableSelectedDimmedText:
85 return kResultsTableDimmedTextMd; 89 return kResultsTableDimmedTextMd;
86 case NativeTheme::kColorId_ResultsTableNormalUrl: 90 case NativeTheme::kColorId_ResultsTableNormalUrl:
87 case NativeTheme::kColorId_ResultsTableHoveredUrl: 91 case NativeTheme::kColorId_ResultsTableHoveredUrl:
88 case NativeTheme::kColorId_ResultsTableSelectedUrl: 92 case NativeTheme::kColorId_ResultsTableSelectedUrl:
89 return base_theme->GetSystemColor(NativeTheme::kColorId_LinkEnabled); 93 return base_theme->GetSystemColor(NativeTheme::kColorId_LinkEnabled);
90 94
95 // Tooltip
96 case NativeTheme::kColorId_TooltipBackground:
97 return kTooltipBackgroundMd;
98 case NativeTheme::kColorId_TooltipText:
99 return kTooltipTextColorMd;
100
91 default: 101 default:
92 break; 102 break;
93 } 103 }
94 } 104 }
95 105
96 // Pre-MD colors. 106 // Pre-MD colors.
97 // Windows: 107 // Windows:
98 static const SkColor kWindowBackgroundColor = SK_ColorWHITE; 108 static const SkColor kWindowBackgroundColor = SK_ColorWHITE;
99 // Dialogs: 109 // Dialogs:
100 static const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251); 110 static const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 431 }
422 if (menu_item.corner_radius > 0) { 432 if (menu_item.corner_radius > 0) {
423 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 433 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
424 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 434 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
425 return; 435 return;
426 } 436 }
427 canvas->drawRect(gfx::RectToSkRect(rect), paint); 437 canvas->drawRect(gfx::RectToSkRect(rect), paint);
428 } 438 }
429 439
430 } // namespace ui 440 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/views/corewm/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698