Index: ui/app_list/views/folder_header_view.cc |
diff --git a/ui/app_list/views/folder_header_view.cc b/ui/app_list/views/folder_header_view.cc |
index 58c54b832e22ad0dcfbb553a2d613dcf998d9846..931692a348f7224383f63a3df6f4d26c8f1d20c7 100644 |
--- a/ui/app_list/views/folder_header_view.cc |
+++ b/ui/app_list/views/folder_header_view.cc |
@@ -167,7 +167,8 @@ void FolderHeaderView::Layout() { |
: folder_name_placeholder_text_; |
int text_width = |
gfx::Canvas::GetStringWidth(text, folder_name_view_->GetFontList()) + |
- folder_name_view_->GetCaretBounds().width(); |
+ folder_name_view_->GetCaretBounds().width() + |
+ 2 * views::Textfield::kTextPadding; |
Peter Kasting
2014/09/05 22:56:49
Can this be calculated by setting |folder_name_vie
msw
2014/09/05 23:46:55
The preferred size of a textfield does not depend
|
text_width = std::min(text_width, kMaxFolderNameWidth); |
text_bounds.set_x(back_bounds.x() + (rect.width() - text_width) / 2); |
text_bounds.set_width(text_width); |