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

Side by Side Diff: chrome/browser/ui/libgtkui/native_theme_gtk2.cc

Issue 2616273002: Native Themes: Add table header colors (Closed)
Patch Set: Address sky@ and estade@'s comments 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/ui/libgtkui/native_theme_gtk2.h" 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk2.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h" 9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h"
10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h" 10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 case kColorId_TableSelectionBackgroundFocused: 261 case kColorId_TableSelectionBackgroundFocused:
262 case kColorId_TableSelectionBackgroundUnfocused: 262 case kColorId_TableSelectionBackgroundUnfocused:
263 case kColorId_TreeSelectionBackgroundFocused: 263 case kColorId_TreeSelectionBackgroundFocused:
264 case kColorId_TreeSelectionBackgroundUnfocused: 264 case kColorId_TreeSelectionBackgroundUnfocused:
265 return GetBgColor(GetTree(), SELECTED); 265 return GetBgColor(GetTree(), SELECTED);
266 case kColorId_TreeArrow: 266 case kColorId_TreeArrow:
267 return GetFgColor(GetTree(), NORMAL); 267 return GetFgColor(GetTree(), NORMAL);
268 case kColorId_TableGroupingIndicatorColor: 268 case kColorId_TableGroupingIndicatorColor:
269 return GetTextAAColor(GetTree(), NORMAL); 269 return GetTextAAColor(GetTree(), NORMAL);
270 270
271 // Table Headers
272 case kColorId_TableHeaderText:
273 return GetTextColor(GetTree(), NORMAL);
274 case kColorId_TableHeaderBackground:
275 return GetBgColor(GetWindow(), NORMAL);
Evan Stade 2017/01/20 01:46:02 why is this not GetTree?
Tom (Use chromium acct) 2017/01/20 19:10:38 The window color is usually slightly darker than t
276 case kColorId_TableHeaderSeparator:
277 return GetFgColor(GetSeparator(), INSENSITIVE);
278
271 // Results Table 279 // Results Table
272 case kColorId_ResultsTableNormalBackground: 280 case kColorId_ResultsTableNormalBackground:
273 return GetSystemColor(kColorId_TextfieldDefaultBackground); 281 return GetSystemColor(kColorId_TextfieldDefaultBackground);
274 case kColorId_ResultsTableHoveredBackground: 282 case kColorId_ResultsTableHoveredBackground:
275 return color_utils::AlphaBlend( 283 return color_utils::AlphaBlend(
276 GetSystemColor(kColorId_TextfieldDefaultBackground), 284 GetSystemColor(kColorId_TextfieldDefaultBackground),
277 GetSystemColor(kColorId_TextfieldSelectionBackgroundFocused), 0x80); 285 GetSystemColor(kColorId_TextfieldSelectionBackgroundFocused), 0x80);
278 case kColorId_ResultsTableSelectedBackground: 286 case kColorId_ResultsTableSelectedBackground:
279 return GetSystemColor(kColorId_TextfieldSelectionBackgroundFocused); 287 return GetSystemColor(kColorId_TextfieldSelectionBackgroundFocused);
280 case kColorId_ResultsTableNormalText: 288 case kColorId_ResultsTableNormalText:
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 GtkWidget* NativeThemeGtk2::GetSeparator() const { 462 GtkWidget* NativeThemeGtk2::GetSeparator() const {
455 static GtkWidget* fake_separator = NULL; 463 static GtkWidget* fake_separator = NULL;
456 464
457 if (!fake_separator) 465 if (!fake_separator)
458 fake_separator = gtk_hseparator_new(); 466 fake_separator = gtk_hseparator_new();
459 467
460 return fake_separator; 468 return fake_separator;
461 } 469 }
462 470
463 } // namespace libgtkui 471 } // namespace libgtkui
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/libgtkui/native_theme_gtk3.cc » ('j') | ui/native_theme/common_theme.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698