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

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

Issue 2700473002: MenuItemView: use disabled text color for subtitles too (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_item_view.h » ('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 "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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return GetBorderColor("GtkMenu#menu"); 105 return GetBorderColor("GtkMenu#menu");
106 case ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor: 106 case ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor:
107 return GetBgColor("GtkMenu#menu GtkMenuItem#menuitem:hover"); 107 return GetBgColor("GtkMenu#menu GtkMenuItem#menuitem:hover");
108 case ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor: 108 case ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor:
109 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem GtkLabel"); 109 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem GtkLabel");
110 case ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor: 110 case ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor:
111 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem:hover GtkLabel"); 111 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem:hover GtkLabel");
112 case ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor: 112 case ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor:
113 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem:disabled GtkLabel"); 113 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem:disabled GtkLabel");
114 case ui::NativeTheme::kColorId_MenuItemSubtitleColor: 114 case ui::NativeTheme::kColorId_MenuItemSubtitleColor:
115 if (GtkVersionCheck(3, 20)) {
116 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem #accelerator");
Tom (Use chromium acct) 2017/02/15 21:33:18 This was actually fine before, but this is more te
Elliot Glaysher 2017/02/15 21:48:19 The best kind of correct!
117 }
115 return GetFgColor( 118 return GetFgColor(
116 "GtkMenu#menu GtkMenuItem#menuitem GtkLabel.accelerator"); 119 "GtkMenu#menu GtkMenuItem#menuitem GtkLabel.accelerator");
117 case ui::NativeTheme::kColorId_MenuSeparatorColor: 120 case ui::NativeTheme::kColorId_MenuSeparatorColor:
118 // MenuButton borders are used as vertical menu separators in Chrome. 121 // MenuButton borders are used as vertical menu separators in Chrome.
119 case ui::NativeTheme::kColorId_EnabledMenuButtonBorderColor: 122 case ui::NativeTheme::kColorId_EnabledMenuButtonBorderColor:
120 case ui::NativeTheme::kColorId_FocusedMenuButtonBorderColor: 123 case ui::NativeTheme::kColorId_FocusedMenuButtonBorderColor:
121 case ui::NativeTheme::kColorId_HoverMenuButtonBorderColor: 124 case ui::NativeTheme::kColorId_HoverMenuButtonBorderColor:
122 if (GtkVersionCheck(3, 20)) { 125 if (GtkVersionCheck(3, 20)) {
123 return GetSeparatorColor( 126 return GetSeparatorColor(
124 "GtkMenu#menu GtkSeparator#separator.horizontal"); 127 "GtkMenu#menu GtkSeparator#separator.horizontal");
125 } else {
126 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem.separator");
127 } 128 }
129 return GetFgColor("GtkMenu#menu GtkMenuItem#menuitem.separator");
128 130
129 // Label 131 // Label
130 case ui::NativeTheme::kColorId_LabelEnabledColor: 132 case ui::NativeTheme::kColorId_LabelEnabledColor:
131 return GetFgColor("GtkLabel"); 133 return GetFgColor("GtkLabel");
132 case ui::NativeTheme::kColorId_LabelDisabledColor: 134 case ui::NativeTheme::kColorId_LabelDisabledColor:
133 return GetFgColor("GtkLabel:disabled"); 135 return GetFgColor("GtkLabel:disabled");
134 case ui::NativeTheme::kColorId_LabelTextSelectionColor: 136 case ui::NativeTheme::kColorId_LabelTextSelectionColor:
135 return GetSelectedTextColor("GtkLabel"); 137 return GetSelectedTextColor("GtkLabel");
136 case ui::NativeTheme::kColorId_LabelTextSelectionBackgroundFocused: 138 case ui::NativeTheme::kColorId_LabelTextSelectionBackgroundFocused:
137 return GetSelectedBgColor("GtkLabel"); 139 return GetSelectedBgColor("GtkLabel");
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 545
544 if (frame_top_area.incognito) { 546 if (frame_top_area.incognito) {
545 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap( 547 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap(
546 bitmap, kDefaultTintFrameIncognito); 548 bitmap, kDefaultTintFrameIncognito);
547 } 549 }
548 550
549 canvas->drawBitmap(bitmap, rect.x(), rect.y()); 551 canvas->drawBitmap(bitmap, rect.x(), rect.y());
550 } 552 }
551 553
552 } // namespace libgtkui 554 } // namespace libgtkui
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698