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

Unified Diff: ui/views/widget/tooltip_manager.cc

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix round-down problems Created 7 years, 2 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/widget/tooltip_manager.cc
diff --git a/ui/views/widget/tooltip_manager.cc b/ui/views/widget/tooltip_manager.cc
index 7eb497876414050988535664288c09c614c058fa..faeffe52e3d78095693a4d2dbf91b82b0389c893 100644
--- a/ui/views/widget/tooltip_manager.cc
+++ b/ui/views/widget/tooltip_manager.cc
@@ -22,7 +22,7 @@ namespace views {
// static
void TooltipManager::TrimTooltipToFit(string16* text,
- int* max_width,
+ float* max_width,
int* line_count,
int x,
int y,
@@ -52,8 +52,8 @@ void TooltipManager::TrimTooltipToFit(string16* text,
++i) {
string16 elided_text =
gfx::ElideText(*i, font_list, available_width, gfx::ELIDE_AT_END);
- *max_width = std::max(*max_width,
- gfx::GetStringWidth(elided_text, font_list));
+ *max_width = std::max(
+ *max_width, gfx::GetStringWidth(elided_text, font_list));
if (!result.empty())
result.push_back('\n');
result.append(elided_text);

Powered by Google App Engine
This is Rietveld 408576698