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

Unified Diff: ui/views/controls/menu/menu_item_view.cc

Issue 205153003: linux_aura: Don't inject black in WrenchMenu::GetForegroundColor(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky rename request Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_item_view.cc
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index e619ee7b753da52667a392991e2e59d4ca7b01ab..386a23e2ae562461beee27563de80f78b2e8dfc2 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -792,12 +792,18 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
}
// Render the foreground.
- ui::NativeTheme::ColorId color_id =
- ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor;
+ ui::NativeTheme::ColorId color_id;
if (enabled()) {
color_id = render_selection ?
ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor:
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor;
+ } else {
+ bool emphasized = delegate &&
+ delegate->GetShouldUseDisabledEmphasizedForegroundColor(
+ GetCommand());
+ color_id = emphasized ?
+ ui::NativeTheme::kColorId_DisabledEmphasizedMenuItemForegroundColor :
+ ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor;
}
SkColor fg_color = native_theme->GetSystemColor(color_id);
SkColor override_foreground_color;
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698