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

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

Issue 2575343005: Native themes: Add MenuItemSubtitleColor (Closed)
Patch Set: Address estade@'s comments Created 4 years 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_gtk2.cc ('k') | ui/native_theme/common_theme.cc » ('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 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 "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 case kColorId_MenuBorderColor: 188 case kColorId_MenuBorderColor:
189 return GetBorderColor("menu", GTK_STATE_FLAG_NORMAL); 189 return GetBorderColor("menu", GTK_STATE_FLAG_NORMAL);
190 case kColorId_FocusedMenuItemBackgroundColor: 190 case kColorId_FocusedMenuItemBackgroundColor:
191 return GetBGColor("menu menuitem", GTK_STATE_FLAG_FOCUSED); 191 return GetBGColor("menu menuitem", GTK_STATE_FLAG_FOCUSED);
192 case kColorId_EnabledMenuItemForegroundColor: 192 case kColorId_EnabledMenuItemForegroundColor:
193 return GetFGColor("menu menuitem label", GTK_STATE_FLAG_NORMAL); 193 return GetFGColor("menu menuitem label", GTK_STATE_FLAG_NORMAL);
194 case kColorId_SelectedMenuItemForegroundColor: 194 case kColorId_SelectedMenuItemForegroundColor:
195 return GetFGColor("menu menuitem label", GTK_STATE_FLAG_SELECTED); 195 return GetFGColor("menu menuitem label", GTK_STATE_FLAG_SELECTED);
196 case kColorId_DisabledMenuItemForegroundColor: 196 case kColorId_DisabledMenuItemForegroundColor:
197 return GetFGColor("menu menuitem label", GTK_STATE_FLAG_INSENSITIVE); 197 return GetFGColor("menu menuitem label", GTK_STATE_FLAG_INSENSITIVE);
198 case kColorId_MenuItemSubtitleColor:
199 return GetFGColor("menu menuitem accelerator", GTK_STATE_FLAG_NORMAL);
198 case kColorId_MenuSeparatorColor: 200 case kColorId_MenuSeparatorColor:
199 // MenuButton borders are used the same way as menu separtors in Chrome. 201 // MenuButton borders are used the same way as menu separtors in Chrome.
200 case kColorId_EnabledMenuButtonBorderColor: 202 case kColorId_EnabledMenuButtonBorderColor:
201 case kColorId_FocusedMenuButtonBorderColor: 203 case kColorId_FocusedMenuButtonBorderColor:
202 case kColorId_HoverMenuButtonBorderColor: 204 case kColorId_HoverMenuButtonBorderColor:
203 return GetFGColor("menu menuitem.separator", GTK_STATE_FLAG_INSENSITIVE); 205 return GetFGColor("menu menuitem.separator", GTK_STATE_FLAG_INSENSITIVE);
204 206
205 // Label 207 // Label
206 case kColorId_LabelEnabledColor: 208 case kColorId_LabelEnabledColor:
207 return GetFGColor(GetEntry(), NORMAL); 209 return GetFGColor(GetEntry(), NORMAL);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 494
493 if (!fake_menu_item) { 495 if (!fake_menu_item) {
494 fake_menu_item = gtk_custom_menu_item_new(); 496 fake_menu_item = gtk_custom_menu_item_new();
495 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); 497 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item);
496 } 498 }
497 499
498 return fake_menu_item; 500 return fake_menu_item;
499 } 501 }
500 502
501 } // namespace libgtkui 503 } // namespace libgtkui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk2.cc ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698