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

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

Issue 12096094: Finalizing the 'OnClick' behavior of the Launcher items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 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 side-by-side diff with in-line comments
Download patch
« ash/launcher/launcher_view.cc ('K') | « 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 0c66f171383c6b89d3db7da92901778d3525c9cb..92beab2fbe0892b2cee21c9335f2f17fe12ab0dc 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -776,7 +776,13 @@ void MenuItemView::PaintButtonCommon(gfx::Canvas* canvas,
// only need the background when we want it to look different, as when we're
// selected.
ui::NativeTheme* native_theme = GetNativeTheme();
- if (render_selection) {
+ SkColor override_color;
+ if (GetDelegate() &&
+ GetDelegate()->GetBackgroundColor(GetCommand(),
+ IsSelected(),
sky 2013/02/01 00:17:33 IsSelected()->render_selection.
Mr4D (OOO till 08-26) 2013/02/01 15:48:28 Done.
+ &override_color)) {
+ canvas->DrawColor(override_color);
+ } else if (render_selection) {
if (ui::NativeTheme::IsNewMenuStyleEnabled()) {
gfx::Rect item_bounds(0, 0, width(), height());
AdjustBoundsForRTLUI(&item_bounds);
« ash/launcher/launcher_view.cc ('K') | « 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