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

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: Corrected Windows 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
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..1255e5b2dd4645684fe984d4900161c2429c61df 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(),
+ &override_color)) {
+ canvas->DrawColor(override_color, SkXfermode::kSrc_Mode);
sky 2013/01/31 21:15:02 I don't think you need kSrc_Mode here, meaning Dra
Mr4D (OOO till 08-26) 2013/01/31 22:38:52 Did it as it was done in line 794 - but done as re
+ } else if (render_selection) {
if (ui::NativeTheme::IsNewMenuStyleEnabled()) {
gfx::Rect item_bounds(0, 0, width(), height());
AdjustBoundsForRTLUI(&item_bounds);
« ui/views/controls/menu/menu_delegate.h ('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