OLD | NEW |
---|---|
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 Loading... | |
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 case kColorId_TableHeaderBackground: | |
274 case kColorId_TableHeaderSeparator: | |
275 // Fallback to using common theme colors. | |
276 return ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor( | |
Evan Stade
2017/01/19 00:49:22
why fall back to common colors? that will give us
Tom (Use chromium acct)
2017/01/19 02:03:23
Changed this to get the colors directly
| |
277 color_id); | |
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 Loading... | |
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 |
OLD | NEW |