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

Unified Diff: ui/views/controls/button/text_button.cc

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch 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/button/text_button.cc
diff --git a/ui/views/controls/button/text_button.cc b/ui/views/controls/button/text_button.cc
index 38e9691b19aafe85fc0020b9f0ac12a24d114e39..66ac9caf3a71db3b8bbc8bac0cc5787ffac75b88 100644
--- a/ui/views/controls/button/text_button.cc
+++ b/ui/views/controls/button/text_button.cc
@@ -374,8 +374,8 @@ void TextButtonBase::UpdateTextSize() {
}
void TextButtonBase::CalculateTextSize(gfx::Size* text_size, int max_width) {
- int h = font_.GetHeight();
- int w = multi_line_ ? max_width : 0;
+ float h = font_.GetHeight();
+ float w = multi_line_ ? max_width : 0;
int flags = ComputeCanvasStringFlags();
if (!multi_line_)
flags |= gfx::Canvas::NO_ELLIPSIS;

Powered by Google App Engine
This is Rietveld 408576698