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

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

Issue 2616273002: Native Themes: Add table header colors (Closed)
Patch Set: Refactor 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_gtk3.h" 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk3.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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 case ui::NativeTheme::kColorId_TreeSelectedText: 222 case ui::NativeTheme::kColorId_TreeSelectedText:
223 case ui::NativeTheme::kColorId_TreeSelectedTextUnfocused: 223 case ui::NativeTheme::kColorId_TreeSelectedTextUnfocused:
224 return GetFgColor( 224 return GetFgColor(
225 "GtkTreeView#treeview.view .view.cell:selected:focus GtkLabel#label"); 225 "GtkTreeView#treeview.view .view.cell:selected:focus GtkLabel#label");
226 case ui::NativeTheme::kColorId_TableSelectionBackgroundFocused: 226 case ui::NativeTheme::kColorId_TableSelectionBackgroundFocused:
227 case ui::NativeTheme::kColorId_TableSelectionBackgroundUnfocused: 227 case ui::NativeTheme::kColorId_TableSelectionBackgroundUnfocused:
228 case ui::NativeTheme::kColorId_TreeSelectionBackgroundFocused: 228 case ui::NativeTheme::kColorId_TreeSelectionBackgroundFocused:
229 case ui::NativeTheme::kColorId_TreeSelectionBackgroundUnfocused: 229 case ui::NativeTheme::kColorId_TreeSelectionBackgroundUnfocused:
230 return GetBgColor("GtkTreeView#treeview.view .view.cell:selected:focus"); 230 return GetBgColor("GtkTreeView#treeview.view .view.cell:selected:focus");
231 231
232 // Table Header
233 case ui::NativeTheme::kColorId_TableHeaderText:
234 return GetFgColor(
235 "GtkTreeView#treeview.view GtkButton#button GtkLabel#label");
236 case ui::NativeTheme::kColorId_TableHeaderBackground:
237 return GetBgColor("GtkTreeView#treeview.view GtkButton#button");
238 case ui::NativeTheme::kColorId_TableHeaderSeparator:
239 return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
240
232 // Results Table 241 // Results Table
233 // TODO(thomasanderson): The GtkEntry selectors was how the gtk2 theme got 242 // TODO(thomasanderson): The GtkEntry selectors was how the gtk2 theme got
234 // these colors. Update this code to use a different widget. 243 // these colors. Update this code to use a different widget.
235 case ui::NativeTheme::kColorId_ResultsTableNormalBackground: 244 case ui::NativeTheme::kColorId_ResultsTableNormalBackground:
236 return GetBgColor("GtkEntry#entry"); 245 return GetBgColor("GtkEntry#entry");
237 case ui::NativeTheme::kColorId_ResultsTableHoveredBackground: 246 case ui::NativeTheme::kColorId_ResultsTableHoveredBackground:
238 return color_utils::AlphaBlend( 247 return color_utils::AlphaBlend(
239 GetBgColor("GtkEntry#entry"), 248 GetBgColor("GtkEntry#entry"),
240 GetBgColor("GtkEntry#entry #selection:selected"), 0x80); 249 GetBgColor("GtkEntry#entry #selection:selected"), 0x80);
241 case ui::NativeTheme::kColorId_ResultsTableSelectedBackground: 250 case ui::NativeTheme::kColorId_ResultsTableSelectedBackground:
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 void NativeThemeGtk3::PaintMenuItemBackground( 374 void NativeThemeGtk3::PaintMenuItemBackground(
366 SkCanvas* canvas, 375 SkCanvas* canvas,
367 State state, 376 State state,
368 const gfx::Rect& rect, 377 const gfx::Rect& rect,
369 const MenuItemExtraParams& menu_item) const { 378 const MenuItemExtraParams& menu_item) const {
370 PaintWidget(canvas, rect, "GtkMenu#menu GtkMenuItem#menuitem", 379 PaintWidget(canvas, rect, "GtkMenu#menu GtkMenuItem#menuitem",
371 StateToStateFlags(state)); 380 StateToStateFlags(state));
372 } 381 }
373 382
374 } // namespace libgtkui 383 } // namespace libgtkui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698