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

Unified Diff: ui/app_list/views/folder_header_view.cc

Issue 516943003: Add textfield internal padding from FocusableBorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore Insets const ref. Created 6 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | ui/app_list/views/search_box_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..097a58a35513a96409cc099adf145d988eb5206a 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() +
+ folder_name_view_->GetInsets().width();
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);
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | ui/app_list/views/search_box_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698