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

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

Issue 12041085: Fix menu corners: the menu background was being painted as a rect when in fact, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch 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_host.cc
diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc
index bea46ac169922e5271b83a90b6788360a65e1370..a456a3f88baf27203c3c094e06a4a9d21ea39f11 100644
--- a/ui/views/controls/menu/menu_host.cc
+++ b/ui/views/controls/menu/menu_host.cc
@@ -36,6 +36,8 @@ void MenuHost::InitMenuHost(Widget* parent,
params.has_dropshadow = true;
params.parent = parent ? parent->GetNativeView() : NULL;
params.bounds = bounds;
+ if (MenuConfig::instance(ui::NativeTheme::instance()).has_rounded_corners)
sky 2013/01/25 16:10:52 Don't use ui::NativeTheme::instance() here, it mig
varunjain 2013/01/25 18:50:40 Done.
+ params.transparent = true;
Init(params);
if (ui::NativeTheme::IsNewMenuStyleEnabled()) {
sky 2013/01/25 16:10:52 Only do this if there are rounded corners.
varunjain 2013/01/25 18:50:40 Done.
@@ -46,6 +48,8 @@ void MenuHost::InitMenuHost(Widget* parent,
}
SetContentsView(contents_view);
+ if (MenuConfig::instance(ui::NativeTheme::instance()).has_rounded_corners)
+ SetOpacity(0);
ShowMenuHost(do_capture);
}

Powered by Google App Engine
This is Rietveld 408576698