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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 516943003: Add textfield internal padding from FocusableBorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update AppList's SearchBoxView and FolderHeaderView; git cl format. 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index cc226968c668f77c0591af2f8d498a0a712107e4..878ba128e87993e43c99e5f0e9757a46bcb210e3 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -647,19 +647,20 @@ gfx::Size LocationBarView::GetPreferredSize() const {
leading_width +=
kItemPadding + location_icon_view_->GetMinimumSize().width();
}
- leading_width += kItemPadding - GetEditLeadingInternalSpace();
+ const int edge_padding = kItemPadding - views::Textfield::kTextPadding;
+ leading_width += edge_padding - GetEditLeadingInternalSpace();
// Compute width of omnibox-trailing content.
int trailing_width = search_button_->visible() ?
(search_button_->GetMinimumSize().width() + kSearchButtonInset) :
horizontal_edge_thickness;
trailing_width += IncrementalMinimumWidth(star_view_) +
- IncrementalMinimumWidth(translate_icon_view_) +
- IncrementalMinimumWidth(open_pdf_in_reader_view_) +
- IncrementalMinimumWidth(manage_passwords_icon_view_) +
- IncrementalMinimumWidth(zoom_view_) +
- IncrementalMinimumWidth(generated_credit_card_view_) +
- IncrementalMinimumWidth(mic_search_view_) + kItemPadding;
+ IncrementalMinimumWidth(translate_icon_view_) +
Peter Kasting 2014/09/05 22:56:49 Nit: I think the old indenting was more correct
msw 2014/09/05 23:46:55 This was done by git cl format, not me, but I've r
+ IncrementalMinimumWidth(open_pdf_in_reader_view_) +
+ IncrementalMinimumWidth(manage_passwords_icon_view_) +
+ IncrementalMinimumWidth(zoom_view_) +
+ IncrementalMinimumWidth(generated_credit_card_view_) +
+ IncrementalMinimumWidth(mic_search_view_) + edge_padding;
for (PageActionViews::const_iterator i(page_action_views_.begin());
i != page_action_views_.end(); ++i)
trailing_width += IncrementalMinimumWidth((*i));
@@ -682,11 +683,12 @@ void LocationBarView::Layout() {
ev_bubble_view_->SetVisible(false);
keyword_hint_view_->SetVisible(false);
+ const int edge_padding = kItemPadding - views::Textfield::kTextPadding;
LocationBarLayout leading_decorations(
LocationBarLayout::LEFT_EDGE,
- kItemPadding - GetEditLeadingInternalSpace());
+ edge_padding - GetEditLeadingInternalSpace());
LocationBarLayout trailing_decorations(LocationBarLayout::RIGHT_EDGE,
- kItemPadding);
+ edge_padding);
const int origin_chip_preferred_width =
origin_chip_view_->GetPreferredSize().width();

Powered by Google App Engine
This is Rietveld 408576698