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

Unified Diff: views/controls/menu/menu_item_view_win.cc

Issue 7491083: Implemented nicer battery status (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix Created 9 years, 4 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 | « views/controls/menu/menu_item_view_gtk.cc ('k') | views/controls/menu/submenu_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_item_view_win.cc
diff --git a/views/controls/menu/menu_item_view_win.cc b/views/controls/menu/menu_item_view_win.cc
index 923e2686a2a24702d14ba0bbcbf02236d40fdbf1..cea5c4c7cb06dfd2a7782a235f25a4c38f9b9f27 100644
--- a/views/controls/menu/menu_item_view_win.cc
+++ b/views/controls/menu/menu_item_view_win.cc
@@ -19,6 +19,12 @@ namespace views {
gfx::Size MenuItemView::CalculatePreferredSize() {
gfx::Size child_size = GetChildPreferredSize();
+ if (child_count() == 1 && title_.empty()) {
+ return gfx::Size(
+ child_size.width(),
+ child_size.height() + GetBottomMargin() + GetTopMargin());
+ }
+
const gfx::Font& font = GetFont();
return gfx::Size(
font.GetStringWidth(title_) + label_start_ + item_right_margin_ +
« no previous file with comments | « views/controls/menu/menu_item_view_gtk.cc ('k') | views/controls/menu/submenu_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698