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

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: Fixed unitialized ivars 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
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..4fb7ebfaa7754f772df5a78b07f6eeb1c7e0498c 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_.size() == 0) {
achuithb 2011/08/09 18:58:07 title_.empty() would be clearer Is this code for
DaveMoore 2011/08/12 21:03:11 Done...It's to make Windows consistent. On 2011/08
+ 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_ +

Powered by Google App Engine
This is Rietveld 408576698