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

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

Issue 2441183002: Gtk3 theme: fix menu entry colors (Closed)
Patch Set: Gtk3 theme: fix menu entry colors Created 4 years, 1 month 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 | « no previous file | no next file » | 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) 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/libgtk2ui/native_theme_gtk2.h" 5 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h" 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h"
10 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" 10 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 case kColorId_BubbleBackground: 241 case kColorId_BubbleBackground:
242 return GetBGColor(GetWindow(), NORMAL); 242 return GetBGColor(GetWindow(), NORMAL);
243 243
244 // FocusableBorder 244 // FocusableBorder
245 case kColorId_FocusedBorderColor: 245 case kColorId_FocusedBorderColor:
246 return GetBGColor(GetEntry(), SELECTED); 246 return GetBGColor(GetEntry(), SELECTED);
247 case kColorId_UnfocusedBorderColor: 247 case kColorId_UnfocusedBorderColor:
248 return GetTextAAColor(GetEntry(), NORMAL); 248 return GetTextAAColor(GetEntry(), NORMAL);
249 249
250 // MenuItem 250 // MenuItem
251 #if GTK_MAJOR_VERSION == 2
252 case kColorId_SelectedMenuItemForegroundColor: 251 case kColorId_SelectedMenuItemForegroundColor:
253 return GetTextColor(GetMenuItem(), SELECTED); 252 return GetTextColor(GetMenuItem(), SELECTED);
254 case kColorId_FocusedMenuItemBackgroundColor: 253 case kColorId_FocusedMenuItemBackgroundColor:
255 return GetBGColor(GetMenuItem(), SELECTED); 254 return GetBGColor(GetMenuItem(), SELECTED);
256 #else
257 case kColorId_SelectedMenuItemForegroundColor:
258 return GetTextColor(GetMenuItem(), PRELIGHT);
259 case kColorId_FocusedMenuItemBackgroundColor:
260 return GetBGColor(GetMenuItem(), PRELIGHT);
261 #endif
262 255
263 case kColorId_EnabledMenuItemForegroundColor: 256 case kColorId_EnabledMenuItemForegroundColor:
264 return GetTextColor(GetMenuItem(), NORMAL); 257 return GetTextColor(GetMenuItem(), NORMAL);
265 case kColorId_DisabledMenuItemForegroundColor: 258 case kColorId_DisabledMenuItemForegroundColor:
266 return GetTextColor(GetMenuItem(), INSENSITIVE); 259 return GetTextColor(GetMenuItem(), INSENSITIVE);
267 case kColorId_FocusedMenuButtonBorderColor: 260 case kColorId_FocusedMenuButtonBorderColor:
268 return GetBGColor(GetEntry(), NORMAL); 261 return GetBGColor(GetEntry(), NORMAL);
269 case kColorId_HoverMenuButtonBorderColor: 262 case kColorId_HoverMenuButtonBorderColor:
270 return GetTextAAColor(GetEntry(), PRELIGHT); 263 return GetTextAAColor(GetEntry(), PRELIGHT);
271 case kColorId_MenuBorderColor: 264 case kColorId_MenuBorderColor:
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 565
573 if (!fake_menu_item) { 566 if (!fake_menu_item) {
574 fake_menu_item = gtk_custom_menu_item_new(); 567 fake_menu_item = gtk_custom_menu_item_new();
575 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); 568 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item);
576 } 569 }
577 570
578 return fake_menu_item; 571 return fake_menu_item;
579 } 572 }
580 573
581 } // namespace libgtk2ui 574 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698