| Index: ui/views/controls/label.cc
|
| diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
|
| index 9b04c091ff1ab436580068f0d8a18cb0e9526562..a777d3d35243aa4539bd919b28c8096acc96b2c5 100644
|
| --- a/ui/views/controls/label.cc
|
| +++ b/ui/views/controls/label.cc
|
| @@ -904,7 +904,8 @@ gfx::Size Label::GetTextSize() const {
|
| // TODO(mukai): use gfx::Rect() to compute the ideal size rather than
|
| // the current width(). See crbug.com/468494, crbug.com/467526, and
|
| // the comment for MultilinePreferredSizeTest in label_unittest.cc.
|
| - render_text_->SetDisplayRect(gfx::Rect(0, 0, width(), 0));
|
| + const int available_width = width() - GetInsets().width();
|
| + render_text_->SetDisplayRect(gfx::Rect(0, 0, available_width, 0));
|
| size = render_text_->GetStringSize();
|
| } else {
|
| // Get the natural text size, unelided and only wrapped on newlines.
|
|
|