Index: chrome/browser/ui/views/find_bar_view.cc |
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc |
index 7ec9e1a93d6c4e15d57bd1064a3c529d0989229e..6441250c2c3f6da708bb6f62d1083d7afab13b79 100644 |
--- a/chrome/browser/ui/views/find_bar_view.cc |
+++ b/chrome/browser/ui/views/find_bar_view.cc |
@@ -325,10 +325,11 @@ void FindBarView::Layout() { |
sz.width(), sz.height()); |
// And whatever space is left in between, gets filled up by the find edit box. |
- int find_text_width = std::max(0, match_count_x - |
- kMarginLeftOfMatchCountLabel - kMarginLeftOfFindTextfield); |
- find_text_->SetBounds(kMarginLeftOfFindTextfield, find_text_y, |
- find_text_width, find_text_->GetPreferredSize().height()); |
+ int left_margin = kMarginLeftOfFindTextfield - views::Textfield::kTextPadding; |
Peter Kasting
2014/08/30 00:46:42
The changes here and below look like they only acc
msw
2014/09/04 01:25:51
Done, but that necessitates increasing kMarginLeft
|
+ int find_text_width = |
+ std::max(0, match_count_x - left_margin - kMarginLeftOfMatchCountLabel); |
+ find_text_->SetBounds(left_margin, find_text_y, find_text_width, |
+ find_text_->GetPreferredSize().height()); |
// The focus forwarder view is a hidden view that should cover the area |
// between the find text box and the find button so that when the user clicks |
@@ -345,9 +346,10 @@ gfx::Size FindBarView::GetPreferredSize() const { |
prefsize.set_height(preferred_height_); |
// Add up all the preferred sizes and margins of the rest of the controls. |
- prefsize.Enlarge(kMarginLeftOfCloseButton + kMarginRightOfCloseButton + |
- kMarginLeftOfFindTextfield, |
- 0); |
+ prefsize.Enlarge( |
+ kMarginLeftOfCloseButton + kMarginRightOfCloseButton + |
+ kMarginLeftOfFindTextfield - views::Textfield::kTextPadding, |
+ 0); |
prefsize.Enlarge(find_previous_button_->GetPreferredSize().width(), 0); |
prefsize.Enlarge(find_next_button_->GetPreferredSize().width(), 0); |
prefsize.Enlarge(close_button_->GetPreferredSize().width(), 0); |