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

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

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes per feedback Created 7 years, 3 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 1e526f1647482bbbcbf359b3d9eb87c2db7708bf..6c033683a92a7c7d67578bd68cdd2e12a06173bd 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -978,7 +978,7 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() {
int string_width = font.GetStringWidth(title_);
if (!subtitle_.empty())
- string_width = std::max(string_width, font.GetStringWidth(subtitle_));
+ string_width = std::max<int>(string_width, font.GetStringWidth(subtitle_));
dimensions.standard_width = string_width + label_start +
item_right_margin_;

Powered by Google App Engine
This is Rietveld 408576698