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

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

Issue 1020623002: [AiS] adding positive and negative theme values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comments for positive and negative text Created 5 years, 9 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 | « chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc ('k') | ui/native_theme/native_theme.h » ('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/fallback_theme.h" 5 #include "ui/native_theme/fallback_theme.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/gfx/color_utils.h" 9 #include "ui/gfx/color_utils.h"
10 #include "ui/native_theme/common_theme.h" 10 #include "ui/native_theme/common_theme.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 color_utils::AlphaBlend( 82 color_utils::AlphaBlend(
83 SK_ColorBLACK, kTextfieldSelectionBackgroundFocused, 0xBB); 83 SK_ColorBLACK, kTextfieldSelectionBackgroundFocused, 0xBB);
84 static const SkColor kResultsTableSelectedOrHoveredUrl = 84 static const SkColor kResultsTableSelectedOrHoveredUrl =
85 SkColorSetARGB(0xff, 0x00, 0x66, 0x22); 85 SkColorSetARGB(0xff, 0x00, 0x66, 0x22);
86 static const SkColor kResultsTableNormalDivider = color_utils::AlphaBlend( 86 static const SkColor kResultsTableNormalDivider = color_utils::AlphaBlend(
87 kResultsTableNormalText, kTextfieldDefaultBackground, 0x34); 87 kResultsTableNormalText, kTextfieldDefaultBackground, 0x34);
88 static const SkColor kResultsTableHoveredDivider = color_utils::AlphaBlend( 88 static const SkColor kResultsTableHoveredDivider = color_utils::AlphaBlend(
89 kResultsTableHoveredText, kResultsTableHoveredBackground, 0x34); 89 kResultsTableHoveredText, kResultsTableHoveredBackground, 0x34);
90 static const SkColor kResultsTabSelectedDivider = color_utils::AlphaBlend( 90 static const SkColor kResultsTabSelectedDivider = color_utils::AlphaBlend(
91 kResultsTableSelectedText, kTextfieldSelectionBackgroundFocused, 0x34); 91 kResultsTableSelectedText, kTextfieldSelectionBackgroundFocused, 0x34);
92 static const SkColor kResultsTablePositiveText =
93 color_utils::AlphaBlend(SK_ColorGREEN, kTextfieldDefaultBackground, 0xDD);
94 static const SkColor kResultsTablePositiveHoveredText =
95 color_utils::AlphaBlend(SK_ColorGREEN, kResultsTableHoveredBackground,
96 0xDD);
97 static const SkColor kResultsTablePositiveSelectedText =
98 color_utils::AlphaBlend(SK_ColorGREEN,
99 kTextfieldSelectionBackgroundFocused, 0xDD);
100 static const SkColor kResultsTableNegativeText =
101 color_utils::AlphaBlend(SK_ColorRED, kTextfieldDefaultBackground, 0xDD);
102 static const SkColor kResultsTableNegativeHoveredText =
103 color_utils::AlphaBlend(SK_ColorRED, kResultsTableHoveredBackground,
104 0xDD);
105 static const SkColor kResultsTableNegativeSelectedText =
106 color_utils::AlphaBlend(SK_ColorRED, kTextfieldSelectionBackgroundFocused,
107 0xDD);
92 108
93 SkColor color; 109 SkColor color;
94 if (CommonThemeGetSystemColor(color_id, &color)) 110 if (CommonThemeGetSystemColor(color_id, &color))
95 return color; 111 return color;
96 112
97 switch (color_id) { 113 switch (color_id) {
98 // Windows 114 // Windows
99 case kColorId_WindowBackground: 115 case kColorId_WindowBackground:
100 return kWindowBackgroundColor; 116 return kWindowBackgroundColor;
101 117
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 return kTextfieldSelectionColor; 214 return kTextfieldSelectionColor;
199 case kColorId_ResultsTableHoveredUrl: 215 case kColorId_ResultsTableHoveredUrl:
200 case kColorId_ResultsTableSelectedUrl: 216 case kColorId_ResultsTableSelectedUrl:
201 return kResultsTableSelectedOrHoveredUrl; 217 return kResultsTableSelectedOrHoveredUrl;
202 case kColorId_ResultsTableNormalDivider: 218 case kColorId_ResultsTableNormalDivider:
203 return kResultsTableNormalDivider; 219 return kResultsTableNormalDivider;
204 case kColorId_ResultsTableHoveredDivider: 220 case kColorId_ResultsTableHoveredDivider:
205 return kResultsTableHoveredDivider; 221 return kResultsTableHoveredDivider;
206 case kColorId_ResultsTableSelectedDivider: 222 case kColorId_ResultsTableSelectedDivider:
207 return kResultsTabSelectedDivider; 223 return kResultsTabSelectedDivider;
224 case kColorId_ResultsTablePositiveText:
225 return kResultsTablePositiveText;
226 case kColorId_ResultsTablePositiveHoveredText:
227 return kResultsTablePositiveHoveredText;
228 case kColorId_ResultsTablePositiveSelectedText:
229 return kResultsTablePositiveSelectedText;
230 case kColorId_ResultsTableNegativeText:
231 return kResultsTableNegativeText;
232 case kColorId_ResultsTableNegativeHoveredText:
233 return kResultsTableNegativeHoveredText;
234 case kColorId_ResultsTableNegativeSelectedText:
235 return kResultsTableNegativeSelectedText;
208 236
209 default: 237 default:
210 NOTREACHED(); 238 NOTREACHED();
211 break; 239 break;
212 } 240 }
213 241
214 return kInvalidColorIdColor; 242 return kInvalidColorIdColor;
215 } 243 }
216 244
217 } // namespace ui 245 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc ('k') | ui/native_theme/native_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698