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

Unified Diff: views/controls/menu/menu_item_view.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.h ('k') | views/controls/menu/menu_item_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_item_view.cc
diff --git a/views/controls/menu/menu_item_view.cc b/views/controls/menu/menu_item_view.cc
index e6a2d4fbdd3f03fcee1a81ebff310132af15d1ae..bfe1b75ed868a6e33ea395213ce2e8abf3592e80 100644
--- a/views/controls/menu/menu_item_view.cc
+++ b/views/controls/menu/menu_item_view.cc
@@ -110,6 +110,11 @@ MenuItemView::~MenuItemView() {
STLDeleteElements(&removed_items_);
}
+void MenuItemView::ChildPreferredSizeChanged(View* child) {
+ pref_size_.SetSize(0, 0);
+ PreferredSizeChanged();
+}
+
bool MenuItemView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
*tooltip = UTF16ToWideHack(tooltip_);
if (!tooltip->empty())
@@ -497,7 +502,7 @@ void MenuItemView::Layout() {
// space.
View* child = child_at(0);
gfx::Size size = child->GetPreferredSize();
- child->SetBounds(label_start_, GetTopMargin(), size.width(), size.height());
+ child->SetBounds(0, GetTopMargin(), size.width(), size.height());
} else {
// Child views are laid out right aligned and given the full height. To
// right align start with the last view and progress to the first.
« no previous file with comments | « views/controls/menu/menu_item_view.h ('k') | views/controls/menu/menu_item_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698