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

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

Issue 2616273002: Native Themes: Add table header colors (Closed)
Patch Set: Add gradients back Created 3 years, 11 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/libgtkui/native_theme_gtk3.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/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
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 base_theme->GetSystemColor(
267 NativeTheme::kColorId_EnabledMenuItemForegroundColor);
268 case NativeTheme::kColorId_TableHeaderBackground:
269 return base_theme->GetSystemColor(
270 NativeTheme::kColorId_MenuBackgroundColor);
271 case NativeTheme::kColorId_TableHeaderSeparator:
272 return base_theme->GetSystemColor(
273 NativeTheme::kColorId_EnabledMenuButtonBorderColor);
274
264 // FocusableBorder 275 // FocusableBorder
265 case NativeTheme::kColorId_FocusedBorderColor: 276 case NativeTheme::kColorId_FocusedBorderColor:
266 return gfx::kGoogleBlue500; 277 return gfx::kGoogleBlue500;
267 case NativeTheme::kColorId_UnfocusedBorderColor: 278 case NativeTheme::kColorId_UnfocusedBorderColor:
268 return SkColorSetA(SK_ColorBLACK, 0x66); 279 return SkColorSetA(SK_ColorBLACK, 0x66);
269 280
270 // Results Tables 281 // Results Tables
271 case NativeTheme::kColorId_ResultsTableNormalBackground: 282 case NativeTheme::kColorId_ResultsTableNormalBackground:
272 return kTextfieldDefaultBackground; 283 return kTextfieldDefaultBackground;
273 case NativeTheme::kColorId_ResultsTableHoveredBackground: 284 case NativeTheme::kColorId_ResultsTableHoveredBackground:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 361 }
351 if (menu_item.corner_radius > 0) { 362 if (menu_item.corner_radius > 0) {
352 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 363 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
353 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 364 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
354 return; 365 return;
355 } 366 }
356 canvas->drawRect(gfx::RectToSkRect(rect), paint); 367 canvas->drawRect(gfx::RectToSkRect(rect), paint);
357 } 368 }
358 369
359 } // namespace ui 370 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk3.cc ('k') | ui/native_theme/native_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698